更新
This commit is contained in:
@@ -378,6 +378,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="detailDietaryText" label="忌口" :span="2">
|
||||||
|
{{ detailDietaryText }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="状态" :span="2">
|
<el-descriptions-item label="状态" :span="2">
|
||||||
<el-tag :type="Number(detailPrescription.void_status) === 1 ? 'danger' : 'success'" size="small">
|
<el-tag :type="Number(detailPrescription.void_status) === 1 ? 'danger' : 'success'" size="small">
|
||||||
{{ Number(detailPrescription.void_status) === 1 ? '已作废' : '正常' }}
|
{{ Number(detailPrescription.void_status) === 1 ? '已作废' : '正常' }}
|
||||||
@@ -837,7 +840,8 @@ import {
|
|||||||
logisticsTraceLineUrgent,
|
logisticsTraceLineUrgent,
|
||||||
analyzeLogisticsPayloadUrgent,
|
analyzeLogisticsPayloadUrgent,
|
||||||
parseLogisticsTracePayload,
|
parseLogisticsTracePayload,
|
||||||
canUpdateAmount
|
canUpdateAmount,
|
||||||
|
formatDietaryTaboo
|
||||||
} from './prescription-order-utils'
|
} from './prescription-order-utils'
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
@@ -896,6 +900,8 @@ const detailPrescription = computed(() => {
|
|||||||
return p && typeof p === 'object' ? p : null
|
return p && typeof p === 'object' ? p : null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const detailDietaryText = computed(() => formatDietaryTaboo(detailPrescription.value?.dietary_taboo))
|
||||||
|
|
||||||
const detailLinkedPayOrders = computed(() => {
|
const detailLinkedPayOrders = computed(() => {
|
||||||
const d = detailData.value
|
const d = detailData.value
|
||||||
if (!d) return []
|
if (!d) return []
|
||||||
|
|||||||
@@ -340,3 +340,18 @@ export function canUpdateAmount(row: { id?: number; fulfillment_status?: number
|
|||||||
const fs = Number(row.fulfillment_status)
|
const fs = Number(row.fulfillment_status)
|
||||||
return fs !== 3 && fs !== 4
|
return fs !== 3 && fs !== 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 处方忌口:库内逗号分隔字符串或前端多选数组,统一为「、」连接展示 */
|
||||||
|
export function formatDietaryTaboo(raw: unknown): string {
|
||||||
|
if (Array.isArray(raw)) {
|
||||||
|
return raw.map((v) => String(v ?? '').trim()).filter(Boolean).join('、')
|
||||||
|
}
|
||||||
|
if (typeof raw === 'string' && raw.trim()) {
|
||||||
|
return raw
|
||||||
|
.split(',')
|
||||||
|
.map((s) => s.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、')
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|||||||
@@ -437,6 +437,7 @@
|
|||||||
<p>主方服法:{{ rxUsageText }}</p>
|
<p>主方服法:{{ rxUsageText }}</p>
|
||||||
<p v-if="rxAuxUsageText">辅方服法:{{ rxAuxUsageText }}</p>
|
<p v-if="rxAuxUsageText">辅方服法:{{ rxAuxUsageText }}</p>
|
||||||
<p v-if="rxAdviceText">医嘱:{{ rxAdviceText }}</p>
|
<p v-if="rxAdviceText">医嘱:{{ rxAdviceText }}</p>
|
||||||
|
<p v-if="slipDietaryText">忌口:{{ slipDietaryText }}</p>
|
||||||
<p v-if="rxRemarkText">备注:{{ rxRemarkText }}</p>
|
<p v-if="rxRemarkText">备注:{{ rxRemarkText }}</p>
|
||||||
<p v-if="rxPharmacyRemarkText" class="rx-text-warn">
|
<p v-if="rxPharmacyRemarkText" class="rx-text-warn">
|
||||||
药房备注:{{ rxPharmacyRemarkText }}
|
药房备注:{{ rxPharmacyRemarkText }}
|
||||||
|
|||||||
@@ -1898,6 +1898,7 @@
|
|||||||
<p v-if="rxAuxUsageText">辅服法:{{ rxAuxUsageText }}</p>
|
<p v-if="rxAuxUsageText">辅服法:{{ rxAuxUsageText }}</p>
|
||||||
</template>
|
</template>
|
||||||
<p v-if="rxAdviceText">医嘱:{{ rxAdviceText }}</p>
|
<p v-if="rxAdviceText">医嘱:{{ rxAdviceText }}</p>
|
||||||
|
<p v-if="slipDietaryText">忌口:{{ slipDietaryText }}</p>
|
||||||
<p v-if="prescriptionTabType === 'internal' && rxRemarkText">备注:{{ rxRemarkText }}</p>
|
<p v-if="prescriptionTabType === 'internal' && rxRemarkText">备注:{{ rxRemarkText }}</p>
|
||||||
<p v-if="rxPharmacyRemarkText" class="rx-text-warn">
|
<p v-if="rxPharmacyRemarkText" class="rx-text-warn">
|
||||||
药房备注:{{ rxPharmacyRemarkText }}
|
药房备注:{{ rxPharmacyRemarkText }}
|
||||||
@@ -2144,6 +2145,7 @@ import {
|
|||||||
analyzeLogisticsPayloadUrgent,
|
analyzeLogisticsPayloadUrgent,
|
||||||
parseLogisticsTracePayload,
|
parseLogisticsTracePayload,
|
||||||
canUpdateAmount,
|
canUpdateAmount,
|
||||||
|
formatDietaryTaboo,
|
||||||
type SlipFormulaType,
|
type SlipFormulaType,
|
||||||
type SlipAuxUsageForm
|
type SlipAuxUsageForm
|
||||||
} from './components/prescription-order-utils'
|
} from './components/prescription-order-utils'
|
||||||
@@ -4544,12 +4546,7 @@ const slipAuxHerbs = computed(() =>
|
|||||||
slipHerbsList.value.filter((h: any) => normalizeSlipFormulaType(h?.formula_type) === '辅方')
|
slipHerbsList.value.filter((h: any) => normalizeSlipFormulaType(h?.formula_type) === '辅方')
|
||||||
)
|
)
|
||||||
|
|
||||||
const slipDietaryText = computed(() => {
|
const slipDietaryText = computed(() => formatDietaryTaboo(prescriptionViewData.value?.dietary_taboo))
|
||||||
const d = prescriptionViewData.value?.dietary_taboo
|
|
||||||
if (Array.isArray(d)) return d.filter(Boolean).join('、')
|
|
||||||
if (typeof d === 'string' && d.trim()) return d.trim()
|
|
||||||
return ''
|
|
||||||
})
|
|
||||||
|
|
||||||
const slipChuwanVisible = computed(() => {
|
const slipChuwanVisible = computed(() => {
|
||||||
const d = prescriptionViewData.value
|
const d = prescriptionViewData.value
|
||||||
|
|||||||
@@ -894,6 +894,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="detailDietaryText" label="忌口" :span="2">
|
||||||
|
{{ detailDietaryText }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="状态" :span="2">
|
<el-descriptions-item label="状态" :span="2">
|
||||||
<el-tag :type="Number(detailPrescription.void_status) === 1 ? 'danger' : 'success'" size="small">
|
<el-tag :type="Number(detailPrescription.void_status) === 1 ? 'danger' : 'success'" size="small">
|
||||||
{{ Number(detailPrescription.void_status) === 1 ? '已作废' : '正常' }}
|
{{ Number(detailPrescription.void_status) === 1 ? '已作废' : '正常' }}
|
||||||
@@ -2311,6 +2314,7 @@
|
|||||||
<div class="rx-text">
|
<div class="rx-text">
|
||||||
<p>服法:{{ rxUsageText }}</p>
|
<p>服法:{{ rxUsageText }}</p>
|
||||||
<p v-if="rxAdviceText">医嘱:{{ rxAdviceText }}</p>
|
<p v-if="rxAdviceText">医嘱:{{ rxAdviceText }}</p>
|
||||||
|
<p v-if="slipDietaryText">忌口:{{ slipDietaryText }}</p>
|
||||||
<p v-if="rxRemarkText">备注:{{ rxRemarkText }}</p>
|
<p v-if="rxRemarkText">备注:{{ rxRemarkText }}</p>
|
||||||
<p v-if="rxPharmacyRemarkText" class="rx-text-warn">
|
<p v-if="rxPharmacyRemarkText" class="rx-text-warn">
|
||||||
药房备注:{{ rxPharmacyRemarkText }}
|
药房备注:{{ rxPharmacyRemarkText }}
|
||||||
@@ -2569,6 +2573,7 @@ import {
|
|||||||
getDoctors,
|
getDoctors,
|
||||||
getAssistants
|
getAssistants
|
||||||
} from '@/api/tcm'
|
} from '@/api/tcm'
|
||||||
|
import { formatDietaryTaboo } from './components/prescription-order-utils'
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
import { jsPDF } from 'jspdf'
|
import { jsPDF } from 'jspdf'
|
||||||
import { getDictData } from '@/api/app'
|
import { getDictData } from '@/api/app'
|
||||||
@@ -3579,6 +3584,8 @@ const detailPrescription = computed(() => {
|
|||||||
return p && typeof p === 'object' ? p : null
|
return p && typeof p === 'object' ? p : null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const detailDietaryText = computed(() => formatDietaryTaboo(detailPrescription.value?.dietary_taboo))
|
||||||
|
|
||||||
function normalizeBizPhone(v: unknown): string {
|
function normalizeBizPhone(v: unknown): string {
|
||||||
if (v === null || v === undefined) return ''
|
if (v === null || v === undefined) return ''
|
||||||
return String(v).replace(/\s/g, '').trim()
|
return String(v).replace(/\s/g, '').trim()
|
||||||
@@ -5185,12 +5192,7 @@ const slipHerbsList = computed(() => {
|
|||||||
return Array.isArray(h) ? h : []
|
return Array.isArray(h) ? h : []
|
||||||
})
|
})
|
||||||
|
|
||||||
const slipDietaryText = computed(() => {
|
const slipDietaryText = computed(() => formatDietaryTaboo(prescriptionViewData.value?.dietary_taboo))
|
||||||
const d = prescriptionViewData.value?.dietary_taboo
|
|
||||||
if (Array.isArray(d)) return d.filter(Boolean).join('、')
|
|
||||||
if (typeof d === 'string' && d.trim()) return d.trim()
|
|
||||||
return ''
|
|
||||||
})
|
|
||||||
|
|
||||||
const slipChuwanVisible = computed(() => {
|
const slipChuwanVisible = computed(() => {
|
||||||
const d = prescriptionViewData.value
|
const d = prescriptionViewData.value
|
||||||
|
|||||||
Reference in New Issue
Block a user