更新
This commit is contained in:
@@ -1809,9 +1809,18 @@
|
||||
<span class="text-lg font-semibold text-green-600">¥{{ ((gancaoPreviewData.fee?.lis_cost || 0) ).toFixed(2) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="总计">
|
||||
<span class="text-xl font-bold text-red-600">
|
||||
¥{{ calculateTotalFee(gancaoPreviewData.fee) }}
|
||||
</span>
|
||||
<div>
|
||||
<span class="text-xl font-bold text-red-600">
|
||||
¥{{ calculateTotalFee(gancaoPreviewData.fee) }}
|
||||
</span>
|
||||
<div class="text-sm text-gray-500 mt-1.5" v-perms="['prescription.order/finance']">
|
||||
占订单总金额:
|
||||
<span class="font-medium text-gray-700">
|
||||
{{ gancaoFeePercentOfOrderAmount(gancaoPreviewData.fee, gancaoPreviewData.amount) }}
|
||||
</span>
|
||||
<span v-if="gancaoPreviewData.amount > 0">%(预报价 ÷ 订单金额 × 100)</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
@@ -3272,6 +3281,14 @@ function calculateTotalFee(fee: any) {
|
||||
return (mCost + procesCost + lisCost).toFixed(2)
|
||||
}
|
||||
|
||||
/** 预报价合计 ÷ 本单总金额 × 100 */
|
||||
function gancaoFeePercentOfOrderAmount(fee: any, orderAmount: unknown) {
|
||||
const total = parseFloat(calculateTotalFee(fee)) || 0
|
||||
const amt = Number(orderAmount) || 0
|
||||
if (amt <= 0) return '—'
|
||||
return ((total / amt) * 100).toFixed(2)
|
||||
}
|
||||
|
||||
// 计算单剂量(所有药材用量总和)
|
||||
function calculateSingleDoseWeight(mList: any[]) {
|
||||
if (!Array.isArray(mList) || mList.length === 0) return '0'
|
||||
|
||||
Reference in New Issue
Block a user