This commit is contained in:
ChenQiuYu 2025-05-12 13:30:59 +08:00
parent 8b78c320b1
commit 6f8e68fa7a
4 changed files with 76 additions and 66 deletions

View File

@ -141,6 +141,7 @@ const statusList = ref([
]) ])
const tab = (item: any) => { const tab = (item: any) => {
query.value.status = item.value query.value.status = item.value
curItem.value={}
emit('getStatus', item.value) emit('getStatus', item.value)
init() init()
} }

View File

@ -1,15 +1,15 @@
<template> <template>
<Mask :width="800" :height="438" :is-show="show"> <Mask :width="800" :height="438" :is-show="show" @close="show = false" :show-footer="true">
<!-- <el-card>--> <!-- <el-card>-->
<!-- <template #header>--> <template #header>
<div class="header"> <div class="header">
<span>收费</span> <span>收费</span>
<CloseBtn @click="show = false" style="margin-top: 12px"></CloseBtn> <CloseBtn @click="show = false" style="margin-top: 12px"></CloseBtn>
</div> </div>
<!-- </template>--> </template>
<div class="panel"> <div class="panel">
<div class="price">{{ retailOrder.totalPrice }}</div> <div class="price">{{ retailOrder.totalPrice }}</div>
<div class="social" > <div class="social">
<CardPay v-model="socialCard"/> <CardPay v-model="socialCard"/>
</div> </div>
<div class="price-type"> <div class="price-type">
@ -22,17 +22,16 @@
<div class="image" :style="{'background-color':item.color}"> <div class="image" :style="{'background-color':item.color}">
<img style="width: 16px;height: 16px;" :src="item.img" alt=""/> <img style="width: 16px;height: 16px;" :src="item.img" alt=""/>
</div> </div>
<span>{{item.name}}</span> <span>{{ item.name }}</span>
</div> </div>
</div> </div>
</div> </div>
<!-- <template #footer>--> <template #footer>
<div class="footer"> <div class="footer">
<el-checkbox v-model="printReceipt">同时打印凭证</el-checkbox> <el-checkbox v-model="printReceipt">同时打印凭证</el-checkbox>
<el-button @click="completeSettlement()" type="primary">完成收费</el-button> <el-button @click="completeSettlement()" type="primary">完成收费</el-button>
</div> </div>
<!-- </template>--> </template>
<!-- </el-card>-->
</Mask> </Mask>
<PersonalPayment ref="psnPaymentRef" @orderCompleted="orderCompleted" @orderCancel="orderCanceled"></PersonalPayment> <PersonalPayment ref="psnPaymentRef" @orderCompleted="orderCompleted" @orderCancel="orderCanceled"></PersonalPayment>
</template> </template>
@ -48,15 +47,16 @@ import {medTypeJson, priceBtnList} from "@/assets/config/constants.ts"
import {useWsStore} from "@/stores/wsStore.ts"; import {useWsStore} from "@/stores/wsStore.ts";
import PersonalPayment from "@/components/charge/PersonalPayment.vue"; import PersonalPayment from "@/components/charge/PersonalPayment.vue";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
const wsStore = useWsStore(); const wsStore = useWsStore();
const socialCard =defineModel<any>(); const socialCard = defineModel<any>();
const show = ref(false) const show = ref(false)
const printReceipt = ref(false); const printReceipt = ref(false);
const payType = ref(null); const payType = ref(null);
const retailOrder = ref<any>(null); const retailOrder = ref<any>(null);
const init = (code: any) => { const init = (code: any) => {
post ('charge/getByCode',{code:code}).then((res:any)=>{ post('charge/getByCode', {code: code}).then((res: any) => {
retailOrder.value = res; retailOrder.value = res;
show.value = true; show.value = true;
}) })
@ -66,21 +66,21 @@ defineExpose({init})
const changePriceType = (type: any) => { const changePriceType = (type: any) => {
payType.value = type; payType.value = type;
} }
const emit = defineEmits(['orderComplete','orderCanceled']) const emit = defineEmits(['orderComplete', 'orderCanceled'])
const completeSettlement = ()=>{ const completeSettlement = () => {
if (!retailOrder.value){ if (!retailOrder.value) {
return; return;
} }
if (payType.value == null){ if (payType.value == null) {
return return
} }
if(payType.value == 1){ if (payType.value == 1) {
// //
console.log('医保结算',socialCard.value) console.log('医保结算', socialCard.value)
socialSettlement(); socialSettlement();
}else { } else {
// //
post('charge/completeOrder',{id:retailOrder.value.id,payType:payType.value}).then((res:any)=>{ post('charge/completeOrder', {id: retailOrder.value.id, payType: payType.value}).then((res: any) => {
orderCompleted() orderCompleted()
}) })
} }
@ -88,18 +88,18 @@ const completeSettlement = ()=>{
} }
const orderCompleted = ()=>{ const orderCompleted = () => {
show.value = false; show.value = false;
ElMessage.success("保存成功") ElMessage.success("保存成功")
emit('orderComplete',printReceipt.value) emit('orderComplete', printReceipt.value)
} }
const orderCanceled = ()=>{ const orderCanceled = () => {
show.value = false; show.value = false;
emit('orderCanceled') emit('orderCanceled')
} }
const getBalcByInsutype = (type:any) =>{ const getBalcByInsutype = (type: any) => {
let balc =0; let balc = 0;
for (const item of socialCard.value.data.insuinfo) { for (const item of socialCard.value.data.insuinfo) {
if (item.insutype == type) { if (item.insutype == type) {
balc = item.balc; balc = item.balc;
@ -109,27 +109,26 @@ const getBalcByInsutype = (type:any) =>{
return balc return balc
} }
const socialSettlement = ()=>{ const socialSettlement = () => {
const params = { const params = {
mdtrtCertType: socialCard.value.mdtrtCertType, mdtrtCertType: socialCard.value.mdtrtCertType,
mdtrtCertNo: socialCard.value.mdtrtCertNo, mdtrtCertNo: socialCard.value.mdtrtCertNo,
insutype: socialCard.value.payInfo.selfpay_prop_type, insutype: socialCard.value.payInfo.selfpay_prop_type,
changeOrderCode:retailOrder.value.code, changeOrderCode: retailOrder.value.code,
} }
post("charge/uploadCostDetails",{changeOrderCode:retailOrder.value.code}).then((res:any)=>{ post("charge/uploadCostDetails", {changeOrderCode: retailOrder.value.code}).then((res: any) => {
// //
post("charge/socialPrePay",{...params}).then((res:any)=>{ post("charge/socialPrePay", {...params}).then((res: any) => {
openPsnPayment(res,params) openPsnPayment(res, params)
}) })
}) })
} }
const psnPaymentRef = ref(); const psnPaymentRef = ref();
const openPsnPayment = (payInfo:any,orderInfo:any)=>{ const openPsnPayment = (payInfo: any, orderInfo: any) => {
nextTick(()=>{ nextTick(() => {
psnPaymentRef.value?.open(payInfo,orderInfo); psnPaymentRef.value?.open(payInfo, orderInfo);
}) })
} }
@ -137,22 +136,23 @@ const openPsnPayment = (payInfo:any,orderInfo:any)=>{
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.panel { .panel {
.price{ .price {
height: 50px; height: 50px;
text-align: center; text-align: center;
font-size: 25px; font-size: 25px;
font-weight: 600; font-weight: 600;
color: rgba(237, 120, 23, 0.8); color: rgba(237, 120, 23, 0.8);
} }
.price-type { .price-type {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
.btn { .btn {
height: 45px; height: 45px;
width: 95px; width: 95px;
@ -165,7 +165,8 @@ const openPsnPayment = (payInfo:any,orderInfo:any)=>{
align-items: center; align-items: center;
padding: 10px; padding: 10px;
cursor: pointer; cursor: pointer;
.image{
.image {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-right: 3px; margin-right: 3px;
@ -190,7 +191,8 @@ const openPsnPayment = (payInfo:any,orderInfo:any)=>{
} }
} }
.footer{
.footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }

View File

@ -19,7 +19,7 @@ const editItem= () => {
<Panel :showTools="false" :showHeader="false"> <Panel :showTools="false" :showHeader="false">
<div class="footer"> <div class="footer">
<div>总金额<span class="text icon"></span><span class="text">{{ totalAmount || '0' }}</span></div> <div>总金额<span class="text icon"></span><span class="text">{{ totalAmount || '0' }}</span></div>
<div class="btn-group" v-if="status == 0"> <div class="btn-group" v-if="status">
<el-button type="primary" disabled>追溯码</el-button> <el-button type="primary" disabled>追溯码</el-button>
<el-button type="primary" @click="editItem">收费</el-button> <el-button type="primary" @click="editItem">收费</el-button>
</div> </div>

View File

@ -30,7 +30,7 @@
@change="handleChange" @change="handleChange"
clearable clearable
style="width: 100%" style="width: 100%"
:disabled="statusDisabled == 1" :disabled="formData.status == 1"
> >
<el-option <el-option
v-for="item in doctorList" v-for="item in doctorList"
@ -46,15 +46,15 @@
</Panel> </Panel>
</div> </div>
<div style="margin-top: 24px"> <div style="margin-top: 24px">
<ServiceDetail v-model="formData.itemDetail" :status="statusDisabled == 0" <ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0"
@totalPriceChange="getOrderTotalPrice"></ServiceDetail> @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
</div> </div>
<div style="margin-top: 24px"> <div style="margin-top: 24px">
<GoodsDetail v-model="formData.goodsDetail" :status="statusDisabled == 0" <GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0"
@totalPriceChange="getOrderTotalPrice"></GoodsDetail> @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
</div> </div>
<div class="bottom"> <div class="bottom">
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="statusDisabled==1"></TotalPrice> <TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="!(statusDisabled)&&formData.status==0"></TotalPrice>
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -207,7 +207,14 @@ const list = () => {
}) })
} }
const getStatus=(status:any)=>{ const getStatus=(status:any)=>{
statusDisabled.value = status console.log(111)
formData.value = {
patientInfo: {},
diagnosisMedicalRecord: {},
goodsDetail: [],
itemDetail: [],
patientRegistration: {}
}
} }
</script> </script>