diff --git a/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts b/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts index ab783619..c4cbb9e7 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts +++ b/apps/web-antd/src/views/doctor/doctor-reception/api/index.ts @@ -24,6 +24,14 @@ export async function getProductListDoctorReception(data: any) { return requestClient.get(`${prefix}product-list`, { params: data }); } +/** + * 获取中药规格 + * @param id + */ +export async function getProcessRuleList(data: any) { + return requestClient.get(`${prefix}process-rule-list`, { params: data }); +} + /** * 获取药品使用方式列表 */ @@ -31,6 +39,13 @@ export async function getDrugUseList() { return requestClient.get(`${prefix}drug-use-list`, {}); } +/** + * 煎煮方式列表 + */ +export async function getUseWayList() { + return requestClient.get(`${prefix}drug-use-way-list`, {}); +} + /** * 接诊 */ diff --git a/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue b/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue index a60b6b79..e950a22c 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/components/PrescrtionDetail.vue @@ -125,28 +125,55 @@ const decrypt = (str: string) => str; // 简单base64解码示例 class="recipe-item" > -
- - {{ - JSON.parse(recipe.content).name || - JSON.parse(recipe.content).drug_name - }} - {{ JSON.parse(recipe.content).number - }}{{ JSON.parse(recipe.content).unit?.name }} -
- {{ JSON.parse(recipe.content).useWay }} +
+
+
+ + {{ + drug?.name || drug?.drug_name + }} + {{ drug?.number }} /g +
+
+ 煎服方法: {{ drug.use_way?.name || '煎服' }},每日{{ + recipe.deployment + }}次,共{{ recipe.dosage }}剂 +
+
+
+

用法:每日{{ recipe.deployment }}次,共{{ recipe.dosage }}剂

+

使用方式:{{ + `${recipe.process_rule_note},${recipe.process_rule}` + }}

- - - - -
- - - -
- 使用方法: {{ recipe.instruction }} +
+
+ + {{ + JSON.parse(recipe.content).name || + JSON.parse(recipe.content).drug_name + }} + {{ JSON.parse(recipe.content).number + }}{{ JSON.parse(recipe.content).unit?.name }} +
+ {{ JSON.parse(recipe.content).useWay }} +
+ + + + + +
+ + + +
+ 使用方法: {{ recipe.instruction }} +
@@ -178,7 +205,13 @@ const decrypt = (str: string) => str; // 简单base64解码示例 {{ item.content?.doctor.name }}
+ + + + + +
总价: ¥{{ item.total_pay_price }}
处方有效期: {{ item.valid_hours }}小时
diff --git a/apps/web-antd/src/views/doctor/doctor-reception/components/WesternModal.vue b/apps/web-antd/src/views/doctor/doctor-reception/components/WesternModal.vue index 7ff072bb..1de5b093 100644 --- a/apps/web-antd/src/views/doctor/doctor-reception/components/WesternModal.vue +++ b/apps/web-antd/src/views/doctor/doctor-reception/components/WesternModal.vue @@ -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) { - + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ + @@ -444,7 +568,7 @@ function updateProductNumber(id, number) { @@ -474,7 +598,7 @@ function updateProductNumber(id, number) {
- +