优化西药诊所开中药处方的提示
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
This commit is contained in:
@@ -5,7 +5,7 @@ VITE_BASE=/
|
||||
VITE_GLOB_API_URL=/api/admin
|
||||
|
||||
# 是否开启压缩,可以设置为 none, brotli, gzip
|
||||
VITE_COMPRESS=none
|
||||
VITE_COMPRESS=gzip
|
||||
|
||||
# 是否开启 PWA
|
||||
VITE_PWA=false
|
||||
|
||||
@@ -122,6 +122,11 @@ const [Modal, modalApi] = useVbenModal({
|
||||
prescriptionStore.loadFromLocalStorage();
|
||||
// 获取挂号诊所信息
|
||||
await prescriptionStore.fetchRegisterStoreInfo();
|
||||
|
||||
// 如果恢复的处方类型是中药,检测并显示转诊提示
|
||||
if (prescriptionStore.activeCategory === 1) {
|
||||
await checkAndShowTransferTip();
|
||||
}
|
||||
} else {
|
||||
console.warn('未提供registerId');
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ const selectPatient = (patient: Patient, isUpdateTabType = true) => {
|
||||
}
|
||||
}
|
||||
activePatient.value = patient.user_patient;
|
||||
|
||||
|
||||
// 恢复之前保存的 activeCategory
|
||||
const savedCategory = localStorage.getItem(`activeCategory${patient.user_patient?.id}`);
|
||||
if (savedCategory) {
|
||||
@@ -371,6 +371,11 @@ const selectPatient = (patient: Patient, isUpdateTabType = true) => {
|
||||
// 否则保持默认值
|
||||
}
|
||||
|
||||
// 如果恢复的处方类型是中药,检测并显示转诊提示
|
||||
if (activeCategory.value === 1) {
|
||||
checkAndShowTransferTip();
|
||||
}
|
||||
|
||||
getPatientItem(patient.id).then((value) => {
|
||||
patientInfo.value = value;
|
||||
userPatientHealthInquiry.value = value.user_patient_health_inquiry;
|
||||
@@ -578,11 +583,11 @@ const sendPrescription = () => {
|
||||
doctor_second_sign: doctorSecondSign.value,
|
||||
}).then((res) => {
|
||||
message.success('处方已发送');
|
||||
|
||||
|
||||
// 检查是否需要转诊
|
||||
const needTransfer = res?.result?.need_transfer || res?.data?.need_transfer || res?.need_transfer;
|
||||
const transferPrescriptionId = res?.result?.transfer_prescription_id || res?.data?.transfer_prescription_id || res?.transfer_prescription_id;
|
||||
|
||||
|
||||
if (needTransfer && transferPrescriptionId) {
|
||||
// 如果需要转诊,获取转诊信息
|
||||
fetchTransferPrescription(transferPrescriptionId);
|
||||
@@ -591,7 +596,7 @@ const sendPrescription = () => {
|
||||
// 不需要转诊,清空转诊信息
|
||||
transferPrescription.value = null;
|
||||
}
|
||||
|
||||
|
||||
// 清空当前数据
|
||||
currentDrugs.value = [];
|
||||
diagnosis.value = '';
|
||||
@@ -603,7 +608,7 @@ const sendPrescription = () => {
|
||||
tabType.value = 1;
|
||||
newDrugInfo.value = {};
|
||||
updateLocalStorage();
|
||||
|
||||
|
||||
// 刷新患者信息
|
||||
if (selectPatientId.value) {
|
||||
getPatientItem(selectPatientId.value).then((value) => {
|
||||
@@ -797,7 +802,7 @@ async function handleSelectCommonPrescription(data: any, type: number) {
|
||||
dosage.value = prescription.dosage ?? 7;
|
||||
dayDosage.value = prescription.day_dosage ?? 2;
|
||||
packageMethodId.value = prescription.package_method_id ?? 2;
|
||||
|
||||
|
||||
// 如果是委托调剂,写入完整加工规则配置 - 只有有效值才写入(大于0),级联加载
|
||||
if (prescription.process_rule_id && prescription.process_rule_id > 0) {
|
||||
processRuleId.value = prescription.process_rule_id;
|
||||
@@ -989,11 +994,11 @@ function tabChange(id) {
|
||||
getStorageKey(activePatient.value?.id, activeCategory.value),
|
||||
JSON.stringify(currentDrugs.value),
|
||||
);
|
||||
|
||||
|
||||
// 更新Tab类型
|
||||
localStorage.setItem(`activeCategory${activePatient.value?.id}`, id);
|
||||
activeCategory.value = id;
|
||||
|
||||
|
||||
// 加载新Tab对应的药品数据
|
||||
currentDrugs.value = JSON.parse(
|
||||
localStorage.getItem(getStorageKey(activePatient.value?.id, id)) || '[]',
|
||||
@@ -1523,7 +1528,7 @@ const newDrugInfo = ref({});
|
||||
*/
|
||||
const fetchTransferPrescription = async (transferPrescriptionId: number) => {
|
||||
if (!transferPrescriptionId) return;
|
||||
|
||||
|
||||
loadingTransfer.value = true;
|
||||
try {
|
||||
// 通过转诊处方ID获取转诊信息
|
||||
@@ -1810,13 +1815,13 @@ watch(
|
||||
item.created_at
|
||||
}}</span>
|
||||
<Tag class="ml-5" :color="item.category === 1? '' : '#455cda'">
|
||||
{{
|
||||
item.prescription_type === 1 ? '中药处方' :
|
||||
item.prescription_type === 2 ? '西药处方' :
|
||||
item.prescription_type === 3 ? '保健食品' :
|
||||
item.prescription_type === 5 ? '产品服务包' :
|
||||
item.prescription_type === 6 ? '非药品' :
|
||||
item.prescription_type === 7 ? '医疗器械' :
|
||||
{{
|
||||
item.prescription_type === 1 ? '中药处方' :
|
||||
item.prescription_type === 2 ? '西药处方' :
|
||||
item.prescription_type === 3 ? '保健食品' :
|
||||
item.prescription_type === 5 ? '产品服务包' :
|
||||
item.prescription_type === 6 ? '非药品' :
|
||||
item.prescription_type === 7 ? '医疗器械' :
|
||||
'未知类型'
|
||||
}} /
|
||||
{{ item.category === 1 ? '自费' : '医保' }}
|
||||
@@ -1835,7 +1840,7 @@ watch(
|
||||
</Timeline>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
|
||||
<!-- 转诊处方卡片 -->
|
||||
<div v-if="transferPrescription" class="transfer-section mt-5">
|
||||
<TransferPrescriptionCard
|
||||
@@ -2535,20 +2540,20 @@ watch(
|
||||
</div>
|
||||
<div class="total-cost">总计:¥{{ totalCost.toFixed(2) }}</div>
|
||||
|
||||
<Button
|
||||
<Button
|
||||
v-if="activeCategory === 1"
|
||||
class="mt-5 w-full"
|
||||
style="display: block"
|
||||
type="primary"
|
||||
class="mt-5 w-full"
|
||||
style="display: block"
|
||||
type="primary"
|
||||
@click="checkChineseMedicineConflict"
|
||||
>
|
||||
发送处方
|
||||
</Button>
|
||||
<Button
|
||||
<Button
|
||||
v-else
|
||||
class="mt-5 w-full"
|
||||
style="display: block"
|
||||
type="primary"
|
||||
class="mt-5 w-full"
|
||||
style="display: block"
|
||||
type="primary"
|
||||
@click="sendPrescription"
|
||||
>
|
||||
发送处方
|
||||
|
||||
Reference in New Issue
Block a user