|
|
@@ -13,11 +13,18 @@ import {
|
|
|
getDeliveryMethodLabelMap,
|
|
|
getLogisticsCompanyLabelMap,
|
|
|
getProcessNodeLabelMap,
|
|
|
+ getMatUsageNameLabelMap,
|
|
|
+ getZyjxLabelMap,
|
|
|
+ getZyRouteLabelMap,
|
|
|
resolveDeliveryMethodLabel,
|
|
|
resolveLogisticsCompanyLabel,
|
|
|
+ resolveMatUsageNameLabel,
|
|
|
resolveProcessNodeLabel,
|
|
|
+ resolveZyjxLabel,
|
|
|
+ resolveZyRouteLabel,
|
|
|
} from '#/api/model/process-node-dict';
|
|
|
import { getPrescriptionDetailMethod } from '#/api';
|
|
|
+import { maskPhone } from '#/utils/mask-phone';
|
|
|
|
|
|
const route = useRoute();
|
|
|
const activeTab = ref('prescription');
|
|
|
@@ -47,17 +54,45 @@ function formatMoney(value?: number): string {
|
|
|
return num.toFixed(2);
|
|
|
}
|
|
|
|
|
|
+function formatPackageCapacity(value?: string): string {
|
|
|
+ if (!value || value === '-') return '-';
|
|
|
+ const text = String(value).trim();
|
|
|
+ if (/ml$/i.test(text)) return text;
|
|
|
+ return `${text}ml`;
|
|
|
+}
|
|
|
+
|
|
|
function applyDictLabels(
|
|
|
data: PrescriptionModel.Detail,
|
|
|
processNodeMap: Map<string, string>,
|
|
|
deliveryMethodMap: Map<string, string>,
|
|
|
logisticsCompanyMap: Map<string, string>,
|
|
|
+ zyjxMap: Map<string, string>,
|
|
|
+ zyRouteMap: Map<string, string>,
|
|
|
+ matUsageNameMap: Map<string, string>,
|
|
|
): PrescriptionModel.Detail {
|
|
|
return {
|
|
|
...data,
|
|
|
+ herbalDetails: data.herbalDetails.map((item) => ({
|
|
|
+ ...item,
|
|
|
+ specialMethod: resolveMatUsageNameLabel(
|
|
|
+ item.specialMethod,
|
|
|
+ matUsageNameMap,
|
|
|
+ ),
|
|
|
+ })),
|
|
|
header: {
|
|
|
...data.header,
|
|
|
status: resolveProcessNodeLabel(data.header.status, processNodeMap),
|
|
|
+ phone: maskPhone(data.header.phone),
|
|
|
+ },
|
|
|
+ prescriptionDetails: {
|
|
|
+ ...data.prescriptionDetails,
|
|
|
+ chineseMedicineForm: resolveZyjxLabel(
|
|
|
+ data.prescriptionDetails.chineseMedicineForm,
|
|
|
+ zyjxMap,
|
|
|
+ ),
|
|
|
+ packageCapacity: formatPackageCapacity(
|
|
|
+ data.prescriptionDetails.packageCapacity,
|
|
|
+ ),
|
|
|
},
|
|
|
deliveryInfo: {
|
|
|
...data.deliveryInfo,
|
|
|
@@ -69,6 +104,11 @@ function applyDictLabels(
|
|
|
data.deliveryInfo.logisticsCompany,
|
|
|
logisticsCompanyMap,
|
|
|
),
|
|
|
+ recipientPhone: maskPhone(data.deliveryInfo.recipientPhone),
|
|
|
+ },
|
|
|
+ usageInfo: {
|
|
|
+ ...data.usageInfo,
|
|
|
+ usageRoute: resolveZyRouteLabel(data.usageInfo.usageRoute, zyRouteMap),
|
|
|
},
|
|
|
processFlowDetails: data.processFlowDetails.map((item) => ({
|
|
|
...item,
|
|
|
@@ -95,18 +135,31 @@ async function loadDetail() {
|
|
|
|
|
|
loading.value = true;
|
|
|
try {
|
|
|
- const [data, processNodeMap, deliveryMethodMap, logisticsCompanyMap] =
|
|
|
- await Promise.all([
|
|
|
- getPrescriptionDetailMethod(id),
|
|
|
- getProcessNodeLabelMap(),
|
|
|
- getDeliveryMethodLabelMap(),
|
|
|
- getLogisticsCompanyLabelMap(),
|
|
|
- ]);
|
|
|
+ const [
|
|
|
+ data,
|
|
|
+ processNodeMap,
|
|
|
+ deliveryMethodMap,
|
|
|
+ logisticsCompanyMap,
|
|
|
+ zyjxMap,
|
|
|
+ zyRouteMap,
|
|
|
+ matUsageNameMap,
|
|
|
+ ] = await Promise.all([
|
|
|
+ getPrescriptionDetailMethod(id),
|
|
|
+ getProcessNodeLabelMap(),
|
|
|
+ getDeliveryMethodLabelMap(),
|
|
|
+ getLogisticsCompanyLabelMap(),
|
|
|
+ getZyjxLabelMap(),
|
|
|
+ getZyRouteLabelMap(),
|
|
|
+ getMatUsageNameLabelMap(),
|
|
|
+ ]);
|
|
|
detail.value = applyDictLabels(
|
|
|
data,
|
|
|
processNodeMap,
|
|
|
deliveryMethodMap,
|
|
|
logisticsCompanyMap,
|
|
|
+ zyjxMap,
|
|
|
+ zyRouteMap,
|
|
|
+ matUsageNameMap,
|
|
|
);
|
|
|
} finally {
|
|
|
loading.value = false;
|
|
|
@@ -172,7 +225,7 @@ watch(prescriptionId, loadDetail, { immediate: true });
|
|
|
<Descriptions.Item label="代煎中心" :label-style="{ width: '120px' }">
|
|
|
{{ header.decoctionCenter }}
|
|
|
</Descriptions.Item>
|
|
|
- <Descriptions.Item label="代煎代码" :label-style="{ width: '120px' }">
|
|
|
+ <Descriptions.Item label="代煎代配" :label-style="{ width: '120px' }">
|
|
|
<span
|
|
|
class="rounded bg-blue-100 px-2 py-0.5 text-sm text-blue-700"
|
|
|
>
|
|
|
@@ -214,11 +267,11 @@ watch(prescriptionId, loadDetail, { immediate: true });
|
|
|
<Descriptions.Item label="总包数">
|
|
|
{{ prescriptionDetails.totalCount }} 包
|
|
|
</Descriptions.Item>
|
|
|
- <Descriptions.Item label="煎药标记">
|
|
|
+ <Descriptions.Item label="浓煎标记">
|
|
|
{{ prescriptionDetails.decoctionMark }}
|
|
|
</Descriptions.Item>
|
|
|
- <Descriptions.Item label="煎药时间">
|
|
|
- {{ prescriptionDetails.decoctionTime }}
|
|
|
+ <Descriptions.Item label="每包容量">
|
|
|
+ {{ prescriptionDetails.packageCapacity }}
|
|
|
</Descriptions.Item>
|
|
|
<Descriptions.Item label="包装类型">
|
|
|
{{ prescriptionDetails.packageType }}
|
|
|
@@ -451,18 +504,18 @@ watch(prescriptionId, loadDetail, { immediate: true });
|
|
|
<span v-else>有</span>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div v-if="item.water" class="text-xs text-gray-500">
|
|
|
- 加水量: {{ item.water }}
|
|
|
+ <!-- <div v-if="item.water" class="text-xs text-gray-500">
|
|
|
+ 加水量: {{ item.water }}ml
|
|
|
</div>
|
|
|
<div v-if="item.weightCheck" class="text-xs text-gray-500">
|
|
|
复核重量: {{ item.weightCheck }}
|
|
|
</div>
|
|
|
- <div v-if="item.weight" class="text-xs text-gray-500">
|
|
|
- 实际重量: {{ item.weight }}
|
|
|
- </div>
|
|
|
- <div v-if="item.deviceName" class="text-xs text-gray-500">
|
|
|
+ <div v-if="item.startConcentrating" class="text-xs text-gray-500">
|
|
|
+ 开始浓缩药量: {{ item.startConcentrating }}ml
|
|
|
+ </div> -->
|
|
|
+ <!-- <div v-if="item.deviceName" class="text-xs text-gray-500">
|
|
|
设备: {{ item.deviceName }}
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div v-if="item.note" class="mt-1 text-xs text-gray-500">
|
|
|
备注: {{ item.note }}
|
|
|
</div>
|