This commit is contained in:
LiJianZhao 2025-05-13 17:04:03 +08:00
parent d3033c10a1
commit ed0a67507f
8 changed files with 27 additions and 18 deletions

View File

@ -95,6 +95,9 @@ const addIdCode = ()=>{
show.value = false;
for (let subItem of tableData.value){
if (subItem.id === selected.value){
if (subItem.idCode == null){
subItem.idCode = [];
}
subItem.idCode?.push(idCode);
break
}

View File

@ -3,7 +3,7 @@ import Panel from '../common/Panel.vue';
import {defineEmits, defineModel,defineProps} from 'vue'
const {status}=defineProps(['status'])
const emit = defineEmits(['save','deleteItem','openCheckOut']);
const emit = defineEmits(['save','deleteItem','openCheckOut',"openSettlement"]);
const save = () => {
emit('save');
};
@ -11,9 +11,12 @@ const deleteItem = () => {
emit('deleteItem');
};
const totalAmount = defineModel<any>()
const editItem= () => {
const openCheckOut= () => {
emit('openCheckOut');
};
const openSettlement =()=>{
emit('openSettlement')
}
</script>
<template>
@ -21,8 +24,8 @@ const editItem= () => {
<div class="footer">
<div>总金额<span class="text icon"></span><span class="text">{{ totalAmount || '0' }}</span></div>
<div class="btn-group" v-if="status">
<el-button type="primary" disabled>追溯码</el-button>
<el-button type="primary" @click="editItem">收费</el-button>
<el-button type="primary" @click="openCheckOut">追溯码</el-button>
<el-button type="primary" @click="openSettlement">收费</el-button>
</div>
</div>
</Panel>

View File

@ -71,7 +71,7 @@
</el-table-column>
<el-table-column label="小计">
<template #default="scope">
{{ scope.row.selectedNum * scope.row.selectedPrice }}
{{ Math.round(scope.row.selectedNum * scope.row.selectedPrice * 100) / 100 }}
</template>
</el-table-column>
<el-table-column label="操作" v-if="props.status">
@ -159,7 +159,7 @@ const goodsSelect = (row: any) => {
row.selectedUnit = row.packagingUnit
row.selectedPrice = row.unitPrice
row.shouldNumber = 1;
row.idCode = row.idCode?.split(",")
row.idCode = row.idCode?row.idCode==""?null:row.idCode.split(","):null
if (goodsDetail.value.find((i: any) => i.id == row.id)) {
@ -200,6 +200,7 @@ const getTotalPrice = () => {
if (goodsDetail.value) {
goodsDetail.value.forEach((item: any) => {
totalPrice += item.selectedNum * item.selectedPrice
totalPrice = Math.round(totalPrice * 100) / 100
})
}

View File

@ -42,7 +42,7 @@
</el-table-column>
<el-table-column label="小计">
<template #default="scope">
{{ scope.row.selectedNum * scope.row.selectedPrice }}
{{ Math.round(scope.row.selectedNum * scope.row.selectedPrice * 100) / 100 }}
</template>
</el-table-column>
<el-table-column label="操作" v-if="props.status">
@ -137,6 +137,7 @@ const getTotalPrice = () => {
if (itemDetail.value) {
itemDetail.value.forEach((item: any) => {
totalPrice += item.selectedNum * item.selectedPrice
totalPrice = Math.round(totalPrice * 100) / 100
})
}

View File

@ -1,8 +1,7 @@
<template>
<Mask :is-show="show" :height="600" :width="1200">
<CloseBtn @click="close"></CloseBtn>
<Mask :is-show="show" :height="600" :width="1300" @close="close">
<div class="container-wrapper">
<div class="table">
<el-table :data="detailList" max-height="500px" highlight-current-row>
@ -39,7 +38,7 @@
</template>
<script setup lang="ts">
import Mask from "@/components/Mask.vue";
import Mask from "@/components/common/Mask.vue";
import {nextTick, ref} from "vue";
import CloseBtn from "@/components/CloseBtn.vue";
import {reconciliationResult} from "@/assets/config/constants.ts"

View File

@ -26,7 +26,7 @@
<div>医生</div>
<div class="doctor">
<el-select
v-model="formData.doctorId"
v-model="formData.patientRegistration.organizationDoctorId"
@change="handleChange"
clearable
style="width: 100%"
@ -54,7 +54,7 @@
@totalPriceChange="getOrderTotalPrice" :statusDisabled="statusDisabled==1"></GoodsDetail>
</div>
<div class="bottom">
<TotalPrice v-model="formData.totalPrice" @save="charge" :status="formData.status ==0" @openCheckOut ="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)"></TotalPrice>
<TotalPrice v-model="formData.totalPrice" @save="charge" :status="formData.status ==0" @openSettlement="charge" @openCheckOut ="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)"></TotalPrice>
</div>
</el-scrollbar>
</div>
@ -190,7 +190,7 @@ const checkTraceCode = (goodsList: any[]) => {
}else {
goodsItem.shouldNumber = Math.ceil(goodsItem.selectedNum / goodsItem.minPackagingNumber);
}
goodsItem.idCode = goodsItem.idCode?.split(",")
goodsItem.idCode = goodsItem.idCode?goodsItem.idCode==""?null:goodsItem.idCode.split(","):null
}
getOrderTotalPrice()
@ -236,8 +236,10 @@ const getOrderTotalPrice = () => {
formData.value.goodsDetail.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
})
formData.value.preTotalPrice = totalPrice
formData.value.totalPrice = totalPrice
formData.value.preTotalPrice = Math.round(totalPrice * 100) / 100
formData.value.totalPrice = Math.round(totalPrice * 100) / 100
}

View File

@ -163,8 +163,8 @@ const getOrderTotalPrice = () => {
formData.value.goodsDetail?.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
})
formData.value.preTotalPrice = totalPrice
formData.value.totalPrice = totalPrice
formData.value.preTotalPrice = Math.round((totalPrice * 100) / 100 )
formData.value.totalPrice = Math.round((totalPrice * 100) / 100 )
}
const caseRef = ref<any>("")
const copyForm = (item: any) => {

View File

@ -53,7 +53,7 @@
import {ref, reactive, onMounted} from 'vue';
import {ElNotification, type TabsPaneContext} from 'element-plus'
import {post} from '@/utils/request.ts'
import { Loading, SuccessFilled } from '@element-plus/icons-vue';
const format = (percentage: number) => ('正在更新')
let updt_time = ref(getDate30DaysAgo())
let current_page = ref(1);