解决合并冲突

This commit is contained in:
2025-12-10 14:20:24 +08:00
parent e1385cb3e6
commit 18f6a845e6
804 changed files with 61881 additions and 13577 deletions

View File

@@ -19,7 +19,7 @@
<span>{{ item.prescriptionNo }}</span>
</div>
<div style="text-align: center">
<h2>医院</h2>
<h2>长春大学医院</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>
@@ -76,7 +76,7 @@
<div class="medicen-list">
<div
style="margin-bottom: 3px"
v-for="(medItem, index) in item.prescriptionInfoDetail"
v-for="(medItem, index) in item.prescriptionInfoDetailList"
:key="medItem.requestId"
>
<span>{{ index + 1 + '. ' }}</span>
@@ -104,7 +104,7 @@
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">医师</span>
<span class="item-value"></span>
<span class="item-value">{{ item.practitionerName }}</span>
</div>
<div>
<span class="item-label">收费</span>
@@ -112,7 +112,7 @@
</div>
<div>
<span class="item-label">合计</span>
<span class="item-value"></span>
<span class="item-value">{{ getTotalPrice(item) }}</span>
</div>
</div>
<div style="display: flex; justify-content: space-between">
@@ -139,9 +139,11 @@
</template>
</el-dialog>
</template>
<script setup>
import { formatDateStr } from '@/utils/index';
//高精度库
import Decimal from 'decimal.js';
const props = defineProps({
open: {
type: Boolean,
@@ -154,6 +156,17 @@ const props = defineProps({
});
const emit = defineEmits(['close']);
//合计
function getTotalPrice(item) {
let totalPrice = new Decimal(0);
item.prescriptionInfoDetailList.forEach((medItem) => {
const price = new Decimal(medItem.totalPrice);
const qty = new Decimal(medItem.quantity);
totalPrice = totalPrice.plus(price.times(qty));
});
return totalPrice.toNumber();
}
function close() {
emit('close');
}
@@ -202,4 +215,4 @@ function clickRow(row) {
width: 87px;
display: inline-block;
}
</style>
</style>