fix: 修复中药开放部分问题

This commit is contained in:
2025-03-10 12:22:56 +08:00
parent 72acbcc462
commit 3e287233c7
5 changed files with 577 additions and 75 deletions

View File

@@ -24,6 +24,14 @@ export async function getProductListDoctorReception(data: any) {
return requestClient.get<any>(`${prefix}product-list`, { params: data });
}
/**
* 获取中药规格
* @param id
*/
export async function getProcessRuleList(data: any) {
return requestClient.get<any>(`${prefix}process-rule-list`, { params: data });
}
/**
* 获取药品使用方式列表
*/
@@ -31,6 +39,13 @@ export async function getDrugUseList() {
return requestClient.get<any>(`${prefix}drug-use-list`, {});
}
/**
* 煎煮方式列表
*/
export async function getUseWayList() {
return requestClient.get<any>(`${prefix}drug-use-way-list`, {});
}
/**
* 接诊
*/

View File

@@ -125,28 +125,55 @@ const decrypt = (str: string) => str; // 简单base64解码示例
class="recipe-item"
>
<!-- <div class="medicine-item" v-for="drug in JSON.parse(recipe.content)" :key="drug?.id">-->
<div class="medicine-item">
<!-- {{JSON.parse(recipe.content)}}-->
<span class="drug-name">{{
JSON.parse(recipe.content).name ||
JSON.parse(recipe.content).drug_name
}}</span>
<span class="drug-quantity">{{ JSON.parse(recipe.content).number
}}{{ JSON.parse(recipe.content).unit?.name }}</span>
<div v-if="JSON.parse(recipe.content).useWay" class="usage-info">
{{ JSON.parse(recipe.content).useWay }}
<div v-if="item.prescription_type === 1">
<div v-for="drug in JSON.parse(recipe.content)" :key="drug?.id">
<div class="medicine-item">
<!-- {{ drug }}-->
<span class="drug-name">{{
drug?.name || drug?.drug_name
}}</span>
<span class="drug-quantity ml-5">{{ drug?.number }} /g</span>
</div>
<div class="">
煎服方法: {{ drug.use_way?.name || '煎服' }}每日{{
recipe.deployment
}}{{ recipe.dosage }}
</div>
</div>
<div class="preparation-info">
<p>用法:每日{{ recipe.deployment }}{{ recipe.dosage }}</p>
<p>使用方式{{
`${recipe.process_rule_note}${recipe.process_rule}`
}}</p>
</div>
<!-- <span class="drug-name">{{ drug?.name || drug?.drug_name }}</span>-->
<!-- <span class="drug-quantity">{{ drug?.number }}{{ drug?.unit?.name }}</span>-->
<!-- <div v-if="drug?.useWay" class="usage-info">-->
<!-- {{ drug.useWay }}-->
<!-- </div>-->
</div>
<!-- <div class="preparation-info">-->
<!-- 煎服方法: 每日{{ recipe.deployment }}{{ recipe.dosage }}-->
<!-- </div>-->
<div class="preparation-info">
使用方法: {{ recipe.instruction }}
<div v-else-if="item.prescription_type === 2">
<div class="medicine-item">
<!-- {{JSON.parse(recipe.content)}}-->
<span class="drug-name">{{
JSON.parse(recipe.content).name ||
JSON.parse(recipe.content).drug_name
}}</span>
<span class="drug-quantity">{{ JSON.parse(recipe.content).number
}}{{ JSON.parse(recipe.content).unit?.name }}</span>
<div
v-if="JSON.parse(recipe.content).useWay"
class="usage-info"
>
{{ JSON.parse(recipe.content).useWay }}
</div>
<!-- <span class="drug-name">{{ drug?.name || drug?.drug_name }}</span>-->
<!-- <span class="drug-quantity">{{ drug?.number }}{{ drug?.unit?.name }}</span>-->
<!-- <div v-if="drug?.useWay" class="usage-info">-->
<!-- {{ drug.useWay }}-->
<!-- </div>-->
</div>
<!-- <div class="preparation-info">-->
<!-- 煎服方法: 每日{{ recipe.deployment }}{{ recipe.dosage }}-->
<!-- </div>-->
<div class="preparation-info">
使用方法: {{ recipe.instruction }}
</div>
</div>
</div>
</div>
@@ -178,7 +205,13 @@ const decrypt = (str: string) => str; // 简单base64解码示例
<label>发药人:</label>
{{ item.content?.doctor.name }}
</div>
<!-- <div class="signature">-->
<!-- <label>加工费:</label>-->
<!-- <span v-if="item.prescription_type === 1">{{ item.content.repice[0].process_price }}</span>-->
<!-- </div>-->
</div>
<div class="price-info"></div>
<div class="price-info">总价: {{ item.total_pay_price }}</div>
<div class="validity">处方有效期: {{ item.valid_hours }}小时</div>
</div>

View File

@@ -39,6 +39,7 @@ const drugUseFrequency = ref([]);
const drugUseType = ref([]);
const drugUnit = ref([]);
const drugTime = ref([]);
const drugUseWay = ref([]);
const selectProductId = ref(0);
const previewImage = ref('');
@@ -50,7 +51,7 @@ const setVisible = (value, instruction = ''): void => {
const getCurrentDrugs = () => {
selectList.value = JSON.parse(
localStorage.getItem(`prescriptionData${activePatientId.value}`) || '{}',
localStorage.getItem(`prescriptionData${activePatientId.value}`) || '[]',
);
};
/**
@@ -79,6 +80,10 @@ function getDrugListByWesternModal(searchKey = '') {
drugList.value = res;
});
}
/**
* 获取药品使用方式列表
*/
function getDrugUseListByWesternModal() {
getDrugUseList().then((res) => {
drugUseNum.value = res.drug_use_num;
@@ -86,6 +91,8 @@ function getDrugUseListByWesternModal() {
drugUseType.value = res.drug_use_type;
drugUnit.value = res.drug_unit;
drugTime.value = res.drug_time;
drugUseWay.value = res.drug_use_way;
// drugProcessRule.value = res.drug_process_rule;
});
}
/**
@@ -111,6 +118,8 @@ function addProducts(data) {
),
unit: drugUnit.value.find((item) => item.id === data.drug.unit_id),
price: data.price,
way_id: data.drug?.way_id,
use_way: drugUseWay.value.find((item) => item.id === data.drug.way_id),
time_id: data.drug.time_id,
type_id: data.drug.type_id,
frequency_id: data.drug.frequency_id,
@@ -237,6 +246,37 @@ function selectProductChange(id) {
selectProductId.value = id;
}
/**
* 选择中药用法
* @param id
*/
function selectDrugUseWayChange(id) {
drugList.value = drugList.value.map((item) =>
// 修改item下面drug的 frequency_id = id
item.id === selectProductId.value
? {
...item,
drug: {
...item.drug,
way_id: id,
},
}
: item,
);
selectList.value = selectList.value.map((item) =>
// 修改item下面drug的 frequency_id = id
item.index_id === selectProductId.value
? {
...item,
way_id: id,
use_ways: drugUseWay.value.find(
(value) => value.id === id,
),
}
: item,
);
}
/**
* 选择频次
* @param id
@@ -409,7 +449,91 @@ function updateProductNumber(id, number) {
</Col>
<Col v-for="item in drugList" :key="item.id" :span="6">
<Badge :count="item.select_number" class="mt-5">
<Card hoverable>
<!-- 中药卡片 -->
<Card v-if="type === 1" hoverable>
<template #actions>
<!-- <MinusOutlined v-if="item.select_number > 0" key="prop" @click="propProducts(item)" />-->
<Button v-if="item.select_number > 0" key="prop" @click="propProducts(item)">从清单移除</Button>
<!-- <ContainerOutlined-->
<!-- @click="setVisible(true, item.drug.instruction)"-->
<!-- />-->
<!-- <PlusOutlined v-if="item.select_number < 1" key="add" @click="addProducts(item)" >添加到清单</PlusOutlined>-->
<Button v-if="item.select_number < 1" key="add" @click="addProducts(item)" >添加到清单</Button>
<!-- <EllipsisOutlined key="ellipsis" />-->
</template>
<CardMeta
:description="item.drug?.pinyin_simple"
:title="item.drug?.drug_name"
>
<template #avatar>
<a-avatar src="https://joeschmoe.io/api/v1/random" />
</template>
</CardMeta>
<div class="card-box mt-5" style="padding: 10px 5px">
<Popover>
<!-- 选择中药煎法-->
<Select
:value="item.drug?.way_id"
class="mt-3 w-full"
@change="selectDrugUseWayChange"
@dropdown-visible-change="selectProductChange(item.id)"
placeholder="煎服"
>
<SelectOption
v-for="(value, index) in drugUseWay"
:key="index"
:value="value.id"
>
{{ value.name }}
</SelectOption>
</Select>
</Popover>
<div class="mt-3">
<!-- 选择单位-->
<InputNumber v-model:value="item.drug.number" class="w-3/4">
<template #addonBefore>
<MinusOutlined
key="prop"
@click="
updateProductNumber(
item.id,
item.drug.number > 1 ? item.drug.number - 1 : 0,
)
"
/>
</template>
<template #addonAfter>
<PlusOutlined
key="add"
@click="
updateProductNumber(
item.id,
item.drug.number < 1000 ? item.drug.number + 1 : 1000,
)
"
/>
</template>
</InputNumber>
<Select
:value="item.drug?.unit_id"
class="w-1/4"
@change="selectUnitChange"
@dropdown-visible-change="selectProductChange(item.id)"
disabled
>
<SelectOption
v-for="(value, index) in drugUnit"
:key="index"
:value="value.id"
>
{{ value.name }}
</SelectOption>
</Select>
</div>
</div>
</Card>
<!-- 西药卡片 -->
<Card v-else-if="type === 2" hoverable>
<template #cover>
<Image :height="200" :src="item.drug?.image" />
</template>
@@ -444,7 +568,7 @@ function updateProductNumber(id, number) {
<!-- 选择频次-->
<Select
:value="item.drug?.frequency_id"
class="mt-3 w-1/3"
class="mt-3 w-full"
@change="selectFrequencyChange"
@dropdown-visible-change="selectProductChange(item.id)"
>
@@ -459,7 +583,7 @@ function updateProductNumber(id, number) {
<!-- 选择时间-->
<Select
:value="item.drug?.time_id"
class="mt-3 w-1/3"
class="mt-3 w-1/2"
@change="selectTimeChange"
@dropdown-visible-change="selectProductChange(item.id)"
>
@@ -474,7 +598,7 @@ function updateProductNumber(id, number) {
<!-- 选择使用方法-->
<Select
:value="item.drug?.type_id"
class="mt-3 w-1/3"
class="mt-3 w-1/2"
@change="selectTypeChange"
@dropdown-visible-change="selectProductChange(item.id)"
>
@@ -488,7 +612,7 @@ function updateProductNumber(id, number) {
</Select>
<div class="mt-3">
<!-- 选择单位-->
<InputNumber :value="item.drug.number" class="w-1/2">
<InputNumber v-model:value="item.drug.number" class="w-3/5">
<template #addonBefore>
<MinusOutlined
key="prop"
@@ -514,7 +638,7 @@ function updateProductNumber(id, number) {
</InputNumber>
<Select
:value="item.drug?.unit_id"
class="w-1/2"
class="w-2/5"
@change="selectUnitChange"
@dropdown-visible-change="selectProductChange(item.id)"
>

View File

@@ -1,8 +1,9 @@
<script setup lang="ts">
import {computed, ref, watch} from 'vue';
import { computed, ref, watch } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
import {
Button,
Descriptions,
@@ -11,12 +12,14 @@ import {
ImagePreviewGroup,
InputNumber,
message,
RadioButton,
RadioGroup,
Select,
SelectOption,
Tag,
Textarea,
Timeline,
TimelineItem,
RadioGroup,
RadioButton,
} from 'ant-design-vue';
import { getRegisterStatus } from '#/util/tool';
@@ -24,6 +27,7 @@ import {
addWestPrescription,
getPatientItem,
getPatientList,
getProcessRuleList,
receptionApi,
} from '#/views/doctor/doctor-reception/api';
@@ -54,7 +58,7 @@ interface UserPatientHealthInquiry {
}
const tabType = ref(0);
const category = ref(0);
const category = ref(1);
const receptionStatus = ref(0);
const updateTabType = ref(false);
// 患者数据
@@ -69,7 +73,12 @@ function getPatientListByReception() {
if (updateTabType.value === false) {
const activePatientId = localStorage.getItem(`doctorReception-id`);
if (activePatientId !== null) {
activeCategory.value =
Number.parseInt(
localStorage.getItem(`activeCategory${activePatientId}`),
) || 1;
// 从patients.value中找到当前选中的id并且触发selectPatient方法
patients.value.forEach((patient) => {
if (patient.id === Number.parseInt(activePatientId)) {
@@ -83,16 +92,16 @@ function getPatientListByReception() {
}
getPatientListByReception();
// 每5秒更新数据
setInterval(getPatientListByReception, 30_000);
setInterval(getPatientListByReception, 600_000);
// 药品分类
const categories = [
{ label: '中药', value: 1 },
{ label: '中成(西)药', value: 2 },
// { label: '西药', value: 2 },
{ label: '保健商品', value: 3 },
// { label: '保健商品', value: 3 },
// { label: '中成药商品', value: 4 },
{ label: '服务包', value: 5 },
// { label: '服务包', value: 5 },
];
// 当前状态
@@ -104,17 +113,72 @@ const diagnosis = ref('');
const medicalAdvice = ref('');
const treatmentPrice = ref(0);
const selectPatientId = ref(0);
const ruleType = ref(1);
const prescriptionList = ref([]);
const totalCost = computed(() => {
/**
* 计算商品总价
*/
const totalProductCost = computed(() => {
if (currentDrugs.value.length === 0) {
return 0;
}
// 如果是中药的时候,计算总价格
if (activeCategory.value === 1) {
return currentDrugs.value.reduce(
(sum, drug) => sum + drug.price * (drug.number || 1) * dosage.value,
0,
);
}
return currentDrugs.value.reduce(
(sum, drug) => sum + drug.price * (drug.select_number || 1),
0,
);
});
/**
* 计算总价
*/
const totalCost = computed(() => {
return totalProductCost.value + processingFee.value;
});
const processRulePrice = ref(0);
const calcMethod = ref(0);
/**
* 计算加工费
*/
const processingFee = computed(() => {
if (ruleType.value === 1) {
return 0;
}
// 已选择药品为空的时候是0
if (currentDrugs.value.length === 0) {
return 0;
}
// 获取本次选择的加工规则
childProcessRuleList.value.find((item) => {
if (item.id === childProcessRuleId.value) {
calcMethod.value = item.calc_method;
processRulePrice.value = item.price;
}
});
// 模式1固定价格模式
if (calcMethod.value === 1) {
return processRulePrice.value;
}
// 模式2单价*用量
if (calcMethod.value === 2) {
return (processRulePrice.value * dosage.value);
}
// 模式2单价*用量
if (calcMethod.value === 3) {
let number = currentDrugs.value.reduce(
(sum, drug) => sum + drug.number,
0,
);
return (processRulePrice.value * dosage.value * number);
}
return 0;
});
const visible = ref<boolean>(false);
const previewImage = ref([]);
@@ -130,7 +194,6 @@ const setVisible = (value, instruction = ''): void => {
} else {
if (typeof instruction === 'string') {
// 如果有逗号,则进行分割 没有则追加到previewImage
console.log(instruction, value, 'sssssss');
if (instruction.includes(',')) {
instruction = instruction.split(',');
previewImage.value = instruction;
@@ -228,6 +291,26 @@ getCurrentDrugs();
* 发送处方
*/
const sendPrescription = () => {
if (activeCategory.value === 1) {
if (ruleType.value === 1) {
if (packageMethodId.value == null) {
message.error('请选择包法');
return;
}
} else {
if (processRuleId.value == null) {
message.error('请选择制剂');
return;
}
if (processRuleNoteId.value == null) {
message.error('请选择规格');
return;
}
if (childProcessRuleId.value == null) {
message.error('请选择备注');
}
}
}
if (diagnosis.value === '') {
message.error('诊断结果不能为空');
return;
@@ -237,30 +320,57 @@ const sendPrescription = () => {
return;
}
// 发送处方逻辑
console.log('处方已发送', {
patient: activePatient.value,
drugs: currentDrugs.value,
diagnosis: diagnosis.value,
medicalAdvice: medicalAdvice.value,
total: totalCost.value,
});
addWestPrescription({
// 当前活动患者的个人信息
patient: activePatient.value,
// 当前处方中的药品列表
drugs: currentDrugs.value,
// 诊断信息
diagnosis: diagnosis.value,
// 医嘱信息
medicalAdvice: medicalAdvice.value,
// 总费用
total: totalCost.value,
// 费用类别
category: category.value,
// 药品类型
drug_type: tabType.value,
// 从本地存储获取的挂号ID
register_id: Number.parseInt(localStorage.getItem(`doctorReception-id`)),
// 治疗费用
treatment_price: treatmentPrice.value,
// 包装方式ID
package_method_id: packageMethodId.value,
// 加工规则ID
process_rule_id: processRuleId.value,
// 加工规则备注ID
process_rule_note_id: processRuleNoteId.value,
// 子加工规则ID
child_process_rule_id: childProcessRuleId.value,
// 加工规则类型
process_rule_type: ruleType.value,
// 处方类型
prescription_type: activeCategory.value,
// 加工费
processing_fee: processRulePrice.value,
// 用药剂量
dosage: dosage.value,
// 每日用药次数
day_dosage: dayDosage.value,
}).then(() => {
message.success('处方已发送');
// 清空当前数据
// currentDrugs.value = [];
// diagnosis.value = '';
// medicalAdvice.value = '';
// updateLocalStorage();
currentDrugs.value = [];
diagnosis.value = '';
medicalAdvice.value = '';
packageMethodId.value = 0;
processRuleId.value = 0;
processRuleNoteId.value = 0;
childProcessRuleId.value = 0;
processRulePrice.value = 0;
dosage.value = 0;
dayDosage.value = 0;
updateLocalStorage();
});
};
@@ -289,6 +399,23 @@ watch(
},
);
// 监听tabType.value变化
watch(
() => activeCategory.value,
(newValue) => {
if (newValue === activeCategory.value) {
return;
}
// 清空当前数据
currentDrugs.value = [];
diagnosis.value = '';
medicalAdvice.value = '';
dosage.value = 1;
dayDosage.value = 1;
updateLocalStorage();
},
);
const [WesternDrugModal, WesternDrugModalApi] = useVbenModal({
connectedComponent: WesternModal,
});
@@ -325,14 +452,15 @@ function splitString(str: string) {
* @param id
*/
function tabChange(id) {
localStorage.setItem(
`prescriptionData${activePatient.value?.id}`,
JSON.stringify([]),
);
localStorage.setItem(`activeCategory${activePatient.value?.id}`, id);
currentDrugs.value = [];
updateLocalStorage();
activeCategory.value = id;
}
/**
* 接诊
*/
function reception() {
receptionApi(localStorage.getItem(`doctorReception-id`)).then((value) => {
message.success('接诊成功');
@@ -341,6 +469,76 @@ function reception() {
receptionStatus.value = 2;
});
}
// 基础配置
const processRuleList = ref([]);
// 子配置
const childProcessRuleList = ref([]);
// 规格
const processRuleNoteList = ref([]);
const processRuleId = ref();
const processRuleNoteId = ref();
const childProcessRuleId = ref();
function getProcessRuleListByDoctor(pid = 0, ruleId = 0) {
let data = {};
data =
ruleId === 0
? {
pid,
}
: {
rule_id: ruleId,
};
getProcessRuleList(data).then((value) => {
if (ruleId !== 0) {
processRuleNoteList.value = value;
} else if (pid === 0) {
processRuleList.value = value;
} else {
childProcessRuleList.value = value;
}
});
}
getProcessRuleListByDoctor();
/**
* 选择煎法
* @param id
*/
function selectProcessRule(id) {
processRuleId.value = id;
getProcessRuleListByDoctor(id);
}
/**
* 选择规格
* @param id
*/
function selectProcessRuleNot(id) {
childProcessRuleId.value = id;
getProcessRuleListByDoctor(0, id);
}
/**
* 选择备注
* @param id
*/
function selectProcessRuleNotCommit(id) {
processRuleNoteId.value = id;
}
const packageMethodId = ref(2);
const packageMethod = [
{ label: '味包', value: 1 },
{ label: '剂包', value: 2 },
];
function selectPackageMethod(id) {
packageMethodId.value = id;
}
// jishu
const dosage = ref(1);
const dayDosage = ref(1);
</script>
<template>
@@ -367,10 +565,20 @@ function reception() {
<!-- 右侧处方区域 -->
<Page v-if="tabType === 1" class="prescription-panel">
<div class="prescription-header">
<Button v-if="receptionStatus === 1" class="send-btn" type="primary" @click="reception">
<Button
v-if="receptionStatus === 1"
class="send-btn"
type="primary"
@click="reception"
>
接诊
</Button>
<Button v-if="receptionStatus === 2" class="send-btn" type="primary" @click="showPrescription">
<Button
v-if="receptionStatus === 2"
class="send-btn"
type="primary"
@click="showPrescription"
>
开具处方
</Button>
</div>
@@ -504,6 +712,7 @@ function reception() {
<span class="time-line-item-created">{{
item.created_at
}}</span>
<Tag class="ml-5">{{ item.prescription_type === 1? '中药处方': '西药处方' }}</Tag>
</TimelineItem>
</Timeline>
</Descriptions.Item>
@@ -515,6 +724,7 @@ function reception() {
<Button class="mb-10" type="primary" @click="tabType = 1">
返回上一页
</Button>
<div class="prescription-header">
<h2>{{ activePatient.name }} 的处方</h2>
<Button class="send-btn" type="primary" @click="sendPrescription">
@@ -536,9 +746,9 @@ function reception() {
<div class="mt-5">
<Button type="primary" @click="openWesternModal"> 添加药品 </Button>
<RadioGroup v-model:value="category">
<RadioButton value="1">自费</RadioButton>
<RadioButton value="2">医保</RadioButton>
<RadioGroup v-model:value="category" class="ml-5">
<RadioButton :value="1">自费</RadioButton>
<RadioButton :value="2">医保</RadioButton>
</RadioGroup>
</div>
<div style="width: 0; height: 0; overflow: hidden">
@@ -561,7 +771,7 @@ function reception() {
<div class="selected-drugs">
<div class="drug-table">
<div class="table-header">
<span>商品图片</span>
<span v-if="activeCategory !== 1">商品图片</span>
<span>商品名称</span>
<span>数量</span>
<span>单价</span>
@@ -573,7 +783,10 @@ function reception() {
:key="drug.id"
class="table-row"
>
<div style="width: 120px; margin: 0 auto;">
<div
v-if="activeCategory !== 1"
style="width: 120px; margin: 0 auto"
>
<Image :src="drug.image" />
</div>
<div>
@@ -581,16 +794,26 @@ function reception() {
<span>药品名称:{{ drug.drug_name }}</span>
</p>
<p>
<span
>用法:{{
`${drug.use_type?.name}${drug.use_num?.name}${drug.use_type?.name},每次${drug.number}${drug.unit?.name}`
}}</span>
<span v-if="activeCategory === 1"
>用法:{{ drug.use_way?.name || '煎服' }}{{ drug.number
}}{{ drug.unit.name }}</span>
<span v-else-if="activeCategory === 2"
>用法:{{
`${drug.use_type?.name}${drug.use_num?.name}${drug.use_type?.name},每次${drug.number}${drug.unit?.name}`
}}</span>
</p>
</div>
<div class="quantity-control">
<Button type="primary" @click="decrement(index)">-</Button>
<span style="margin: 0 20px">{{ drug.select_number }}</span>
<Button type="primary" @click="increment(index)">+</Button>
<div>
<div v-if="activeCategory === 1" class="quantity-control">
<Button type="primary" @click="decrement(index)">-</Button>
<span style="margin: 0 20px">{{ drug.number }}</span>
<Button type="primary" @click="increment(index)">+</Button>
</div>
<div v-else class="quantity-control">
<Button type="primary" @click="decrement(index)">-</Button>
<span style="margin: 0 20px">{{ drug.number }}</span>
<Button type="primary" @click="increment(index)">+</Button>
</div>
</div>
<span>{{ drug.price }}</span>
<div>
@@ -610,14 +833,117 @@ function reception() {
<!-- 诊断和医嘱 -->
<div class="diagnosis-area">
<Textarea
v-model:value="diagnosis"
placeholder="输入诊断结果..."
/>
<Textarea
v-model:value="medicalAdvice"
placeholder="输入医嘱..."
/>
<div v-if="activeCategory === 1" class="mb-5">
<RadioGroup v-model:value="ruleType">
<RadioButton :value="1">自制剂</RadioButton>
<RadioButton :value="2">委托调剂</RadioButton>
</RadioGroup>
<div v-if="ruleType === 1">
<!-- 选择包法-->
<Select
:value="packageMethodId"
class="mt-3 w-1/5"
placeholder="请选择包法"
@change="selectPackageMethod"
>
<SelectOption
v-for="(value, index) in packageMethod"
:key="index"
:value="value.value"
>
{{ value.label }}
</SelectOption>
</Select>
</div>
<div v-else-if="ruleType === 2">
<!-- 选择制剂-->
<Select
v-model:value="processRuleId"
class="mt-3 w-1/5"
placeholder="请选择制剂"
@change="selectProcessRule"
>
<SelectOption
v-for="(value, index) in processRuleList"
:key="index"
:value="value.id"
>
{{ value.name }}
</SelectOption>
</Select>
<!-- 选择规格-->
<Select
v-model:value="childProcessRuleId"
class="ml-3 mt-3 w-1/5"
placeholder="请选择煎法"
@change="selectProcessRuleNot"
>
<SelectOption
v-for="(value, index) in childProcessRuleList"
:key="index"
:value="value.id"
>
{{ value.name }}
</SelectOption>
</Select>
<!-- 选择备注-->
<Select
v-model:value="processRuleNoteId"
class="ml-3 mt-3 w-1/5"
placeholder="请选择备注"
@change="selectProcessRuleNotCommit"
>
<SelectOption
v-for="(value, index) in processRuleNoteList"
:key="index"
:value="value.id"
>
{{ value.note }}
</SelectOption>
</Select>
</div>
<div class="mt-5">
用量:
<InputNumber v-model:value="dosage" class="w-1/5">
<template #addonBefore>
<MinusOutlined
key="prop"
@click="dosage = dosage > 1 ? dosage - 1 : 1"
/>
</template>
<template #addonAfter>
<PlusOutlined
key="add"
@click="dosage = dosage < 100 ? dosage + 1 : 100"
/>
</template>
</InputNumber>
天 / {{ dosage }} 剂
</div>
<div class="mt-5">
频次:
<InputNumber v-model:value="dayDosage" class="w-1/5">
<template #addonBefore>
<MinusOutlined
key="prop"
@click="dayDosage = dayDosage > 1 ? dayDosage - 1 : 1"
/>
</template>
<template #addonAfter>
<PlusOutlined
key="add"
@click="dayDosage = dayDosage < 100 ? dayDosage + 1 : 100"
/>
</template>
</InputNumber>
次/天
</div>
</div>
<Button type="primary">常用诊断</Button>
<Textarea v-model:value="diagnosis" placeholder="输入诊断结果..." />
<Button type="primary">常用医嘱</Button>
<Textarea v-model:value="medicalAdvice" placeholder="输入医嘱..." />
诊疗费用:
<InputNumber
v-model:value="treatmentPrice"
placeholder="请输入诊疗价格"
@@ -627,6 +953,8 @@ function reception() {
</div>
<!-- 费用总计 -->
<div class="total-cost">加工费:¥{{ processingFee.toFixed(2) }}</div>
<div class="total-cost">商品价格:¥{{ totalProductCost.toFixed(2) }}</div>
<div class="total-cost">总计:¥{{ totalCost.toFixed(2) }}</div>
</Page>
<div v-else-if="tabType === 0" class="prescription-panel">

View File

@@ -47,6 +47,8 @@ export function useWatermark() {
...cachedOptions.value,
...options,
};
// 这里填写水印颜色
cachedOptions.value.globalAlpha = 0.15;
watermark.value = new Watermark(cachedOptions.value);
updatePreferences({ app: { watermark: true } });
await watermark.value?.create();