This commit is contained in:
LiJianZhao 2025-04-28 17:06:06 +08:00
parent 2e844dd98e
commit 212f4991ce
13 changed files with 143 additions and 85 deletions

View File

@ -42,7 +42,7 @@ const inputStr = (str: string) => {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 5px 0; padding: 5px 0;
border-bottom: 1px solid #fffeee; border-bottom: 1px solid #DDDDDD;
.code-item-name{ .code-item-name{
float: left; float: left;
font-size: 16px; font-size: 16px;

View File

@ -10,23 +10,23 @@
<li class="list-item" :class="curItem.id == item.id ? 'active' : ''" v-for="(item, index) in orderList" <li class="list-item" :class="curItem.id == item.id ? 'active' : ''" v-for="(item, index) in orderList"
:key="index" @click="clickItem(item)"> :key="index" @click="clickItem(item)">
<span> <span>
<img v-if="item.patinetGender==''" class="avatar" src="/static/images/outpatient/man.png" <img v-if="item.patientRegistration.gender==''" class="avatar" src="/static/images/outpatient/man.png"
alt="头像"/> alt="头像"/>
<img v-if="item.patinetGender==''" class="avatar" src="/static/images/outpatient/women.png" <img v-if="item.patientRegistration.gender==''" class="avatar" src="/static/images/outpatient/women.png"
alt="头像"/> alt="头像"/>
</span> </span>
<span class="item_name">{{ item.patientName }}</span> <span class="item_name">{{ item.patientInfo.name }}</span>
<el-tooltip <el-tooltip
class="box-item" class="box-item"
effect="dark" effect="dark"
:content="formatTime(item.createDatetime)||'-'" :content="formatTime(item.patientRegistration.createDatetime)||'-'"
placement="bottom-start" placement="bottom-start"
> >
<span class="item_time"> <span class="item_time">
{{ formatTime(item.createDatetime) || '-' }} {{ formatTime(item.patientRegistration.createDatetime) || '-' }}
</span> </span>
</el-tooltip> </el-tooltip>
<span>01-01</span> <span :class="[item.status == 0 ?'status-active':'']">{{item.status == 0 ? '未收' : '已收'}}</span>
</li> </li>
</ul> </ul>
</el-scrollbar> </el-scrollbar>
@ -81,7 +81,7 @@ const delDraft = () =>{
orderList.value.shift(); orderList.value.shift();
clickFirst() clickFirst()
} }
defineExpose({delDraft}) defineExpose({delDraft,getOrderList})
onMounted(()=>{ onMounted(()=>{
getOrderList() getOrderList()
}) })
@ -151,6 +151,7 @@ onMounted(()=>{
} }
} }
&:hover { &:hover {
background: rgba(#4D6DE4, 0.1); background: rgba(#4D6DE4, 0.1);
} }
@ -169,8 +170,12 @@ onMounted(()=>{
text-overflow: ellipsis; // text-overflow: ellipsis; //
} }
}
}
.status-active{
font-weight: bold;
color: #409EFF;
}
.active { .active {
color: #fff; color: #fff;
background: #4D6DE4; background: #4D6DE4;

View File

@ -1,9 +1,10 @@
<template> <template>
<el-table :data="list" max-height="150"> <el-table :data="data.goodsDetail" max-height="150">
<el-table-column prop="name" label="名称"></el-table-column> <el-table-column prop="name" label="名称"></el-table-column>
<el-table-column prop="selectedPrice" label="单价"></el-table-column> <el-table-column prop="selectedPrice" label="单价"></el-table-column>
<el-table-column prop="number" label="数量"> <el-table-column prop="number" label="数量">
<template #default="scope"> <template #default="scope">
<div v-if="data.status == 0">
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"></el-input-number> <el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"></el-input-number>
<el-dropdown> <el-dropdown>
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span> <span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
@ -16,9 +17,14 @@
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
</div>
<div v-else>
<div>{{ scope.row.selectedNum }} {{ scope.row.selectedUnit }}</div>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" v-if="data.status == 0">
<template #default="scope"> <template #default="scope">
<el-button type="danger" link @click="delGoods(scope.row)">X</el-button> <el-button type="danger" link @click="delGoods(scope.row)">X</el-button>
</template> </template>
@ -29,9 +35,9 @@
<script setup lang="ts"> <script setup lang="ts">
import SearchInput from "@/components/SearchInput.vue"; import SearchInput from "@/components/SearchInput.vue";
const list = defineModel<any>(); const data = defineModel<any>();
const delGoods = (item: any) => { const delGoods = (item: any) => {
list.value = list.value.filter((i: any) => i.id != item.id) data.value.goodsDetail = data.value.filter((i: any) => i.id != item.id)
} }
const goodsSearchApi = "goods/goods/search"; const goodsSearchApi = "goods/goods/search";
@ -50,11 +56,10 @@ const goodsShowConfig = [
}, },
] ]
const goodsSelect = (row: any) => { const goodsSelect = (row: any) => {
row.selectedNum = 1 row.selectedNum = 1
row.selectedUnit = row.packagingUnit row.selectedUnit = row.packagingUnit
row.selectedPrice = row.unitPrice row.selectedPrice = row.unitPrice
list.value.push(row) data.value.goodsDetail.push(row)
emit('totalPriceChange') emit('totalPriceChange')
} }
const selectUnit = (item: any, unit: any) => { const selectUnit = (item: any, unit: any) => {

View File

@ -69,13 +69,13 @@ const completeSettlement = ()=>{
}) })
return return
} }
debugger
const params = { const params = {
mdtrtCertType: socialPayInfo.value.mdtrtCertType, mdtrtCertType: orderInfo.value.mdtrtCertType,
mdtrtCertNo: socialPayInfo.value.mdtrtCertNo, mdtrtCertNo: orderInfo.value.mdtrtCertNo,
insutype: orderInfo.value.insutype, insutype: orderInfo.value.insutype,
changeOrderCode:orderInfo.value.code, changeOrderCode:orderInfo.value.changeOrderCode,
} }
debugger
post("charge/socialRealPay",{...params}).then((res:any)=>{ post("charge/socialRealPay",{...params}).then((res:any)=>{
show.value = false; show.value = false;

View File

@ -1,10 +1,19 @@
<template> <template>
<el-table :data="list" max-height="150"> <el-table :data="data.itemDetail" max-height="150">
<el-table-column prop="name" label="名称"></el-table-column> <el-table-column prop="itemName" label="名称"></el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column> <el-table-column prop="selectedUnit" label="单位"></el-table-column>
<el-table-column prop="unitPrice" label="单价"></el-table-column> <el-table-column prop="selectedPrice" label="单价"></el-table-column>
<el-table-column prop="number" label="数量"></el-table-column> <el-table-column label="数量">
<el-table-column label="操作"> <template #default="scope">
<div v-if="data.status == 0">
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"></el-input-number>
</div>
<div v-else>
{{ scope.row.selectedNum }}
</div>
</template>
</el-table-column>
<el-table-column label="操作" v-if="data.status ==0">
<template #default="scope"> <template #default="scope">
<el-button type="danger" link @click="delService(scope.row)">X</el-button> <el-button type="danger" link @click="delService(scope.row)">X</el-button>
</template> </template>
@ -15,9 +24,9 @@
<script setup lang="ts"> <script setup lang="ts">
import SearchInput from "@/components/SearchInput.vue"; import SearchInput from "@/components/SearchInput.vue";
const list =defineModel<any>(); const data =defineModel<any>();
const delService = (item: any) => { const delService = (item: any) => {
list.value = list.value.filter((i: any) => i.id != item.id) data.value.itemDetail = data.value.filter((i: any) => i.id != item.id)
} }
const serviceSearchApi = "item/search"; const serviceSearchApi = "item/search";
@ -35,12 +44,16 @@ const serviceShowConfig = [
prop: "unitPrice", prop: "unitPrice",
}, },
] ]
const emit = defineEmits(['selectedCallBack']) const emit = defineEmits(['totalPriceChange'])
const serviceSelect = (row: any) => { const serviceSelect = (row: any) => {
row.name = row.itemName row.selectedNum = 1
row.number = 1 row.selectedUnit = row.unit
list.value.push(row) row.selectedPrice = row.unitPrice
emit('selectedCallBack',row) data.value.itemDetail.push(row)
emit('totalPriceChange',row)
}
const handleNumChange = ()=>{
emit('totalPriceChange')
} }

View File

@ -60,9 +60,10 @@ 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 = (order: any) => { const init = (code: any) => {
retailOrder.value = order; post ('charge/getByCode',{code:code}).then((res:any)=>{
console.log(order) retailOrder.value = res;
})
show.value = true; show.value = true;
} }
defineExpose({init}) defineExpose({init})
@ -131,7 +132,7 @@ const socialSettlement = ()=>{
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);
}) })
} }

View File

@ -87,7 +87,11 @@ const init = (_type: number,_name:string) => {
keyword.value=_name; keyword.value=_name;
show.value = true; show.value = true;
init_search_data() init_search_data()
debugger
if (keyword.value && keyword.value != ""){
search_social() search_social()
}
}; };
defineExpose({init}); defineExpose({init});

View File

@ -3,7 +3,7 @@
<template #tools> <template #tools>
<div class="content"> <div class="content">
<div class="model-selector"> <div class="model-selector">
<el-select v-model="modelType"> <el-select v-model="formDate.diagType">
<el-option label="西医模板" :value="0"/> <el-option label="西医模板" :value="0"/>
<el-option label="中医模板" :value="1"/> <el-option label="中医模板" :value="1"/>
<el-option label="口腔模板" :value="2"/> <el-option label="口腔模板" :value="2"/>

View File

@ -8,7 +8,7 @@
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
<span class="type">{{ item.type }}</span> <span class="type">{{ item.type }}</span>
<span class="unit"> <span class="unit">
<el-input-number v-model="item.selectedNum" min="0"></el-input-number> <el-input-number v-model="item.selectedNum" min="1"></el-input-number>
<el-dropdown> <el-dropdown>
<span style="line-height: 30px;margin-left: 10px">{{ item.selectedUnit }}</span> <span style="line-height: 30px;margin-left: 10px">{{ item.selectedUnit }}</span>
<template #dropdown> <template #dropdown>

View File

@ -6,8 +6,12 @@
<li class="item" v-for="(item, index) in list" :key="index"> <li class="item" v-for="(item, index) in list" :key="index">
<span class="index">{{ index + 1 }}</span> <span class="index">{{ index + 1 }}</span>
<span class="name">{{ item.itemName }}</span> <span class="name">{{ item.itemName }}</span>
<span class="code">{{ item.itemSocialCode }}</span>
<span class="price">{{ item.unitPrice }}</span> <span class="price">{{ item.unitPrice }}</span>
<span class="code">{{ item.itemSocialCode }}</span>
<span class="unit">
<el-input-number v-model="item.selectedNum" min="1"></el-input-number>
<span style="line-height: 30px;margin-left: 10px">{{ item.unit }}</span>
</span>
<span class="delete"> <span class="delete">
<el-button @click="deleteItem(item.id)"> <el-button @click="deleteItem(item.id)">
<el-icon><CircleClose/></el-icon> <el-icon><CircleClose/></el-icon>
@ -26,7 +30,7 @@
> >
</SearchInput> </SearchInput>
</div> </div>
<span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.unitPrice, 0) }}</span></div> <span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.unitPrice*cur.selectedNum, 0) }}</span></div>
</div> </div>
</Panel> </Panel>
</template> </template>
@ -51,6 +55,7 @@ const serviceShowConfig = [
}, },
] ]
const serviceSelect = (row: any) => { const serviceSelect = (row: any) => {
row.selectedNum = 1
list.value.push(row) list.value.push(row)
} }
@ -75,35 +80,40 @@ const deleteItem = (id: any) => {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.index{
.index {
height: 100%; height: 100%;
width: 50px; width: 50px;
text-align: center; text-align: center;
border-right: 1px solid #EAEAEC; border-right: 1px solid #EAEAEC;
line-height: 64px; line-height: 64px;
} }
.name{
.name {
flex: 1; flex: 1;
margin-left: 10px; margin-left: 10px;
border-right: 1px solid #EAEAEC; border-right: 1px solid #EAEAEC;
height: 100%; height: 100%;
line-height: 64px; line-height: 64px;
} }
.code{
.code {
flex: 1; flex: 1;
margin-left: 10px; margin-left: 10px;
border-right: 1px solid #EAEAEC; border-right: 1px solid #EAEAEC;
height: 100%; height: 100%;
line-height: 64px; line-height: 64px;
} }
.price{
.price {
height: 100%; height: 100%;
width: 200px; width: 200px;
line-height: 64px; line-height: 64px;
border-right: 1px solid #EAEAEC; border-right: 1px solid #EAEAEC;
text-align: center; text-align: center;
} }
.delete{
.delete {
height: 100%; height: 100%;
width: 50px; width: 50px;
line-height: 64px; line-height: 64px;
@ -117,6 +127,7 @@ const deleteItem = (id: any) => {
border-top: 1px solid #EAEAEC; border-top: 1px solid #EAEAEC;
display: flex; display: flex;
align-items: center; align-items: center;
.search-input { .search-input {
height: 100%; height: 100%;
flex: 1; flex: 1;

View File

@ -5,16 +5,16 @@
<ul> <ul>
<li class="item" v-for="(item, index) in list" :key="index"> <li class="item" v-for="(item, index) in list" :key="index">
<span class="index">{{ index + 1 }}</span> <span class="index">{{ index + 1 }}</span>
<span class="name">{{ item.name }}</span> <span class="name">{{ item.itemName }}</span>
<span class="code">{{ item.socialCode }}</span> <span class="code">{{ item.itemSocialCode }}</span>
<span class="unit">{{ item.unit }}</span> <span class="unit">{{item.selectedNum}}{{ item.selectedUnit }}</span>
<span class="price">{{ item.unitPrice }}</span> <span class="price">{{ item.selectedPrice }}</span>
</li> </li>
</ul> </ul>
</div> </div>
<div class="search"> <div class="search">
<span style="margin-left: 24px">合计</span> <span style="margin-left: 24px">合计</span>
<span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.unitPrice, 0) }}</span> <span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.selectedPrice, 0) }}</span>
</div> </div>
</div> </div>
</Panel> </Panel>

View File

@ -2,17 +2,20 @@
<div class="container"> <div class="container">
<div class="left"> <div class="left">
<Panel title="收费队列"> <Panel title="收费队列">
<ChargeQueue @clickItem="clickItem" ref="chargeQueue"></ChargeQueue> <chargeQueue @clickItem="clickItem" ref="chargeQueueRef"></ChargeQueue>
</Panel> </Panel>
</div> </div>
<div class="middle"> <div class="middle">
<Panel title="零售收费"> <Panel title="零售收费">
<template #tools> <template #tools>
<span>{{formData.totalPrice}}</span> <span>{{formData.totalPrice}}</span>
<div v-if="formData.status == 0 ">
<el-button type="primary" @click="delDraft()" v-if="formData.id == -1" >删除</el-button> <el-button type="primary" @click="delDraft()" v-if="formData.id == -1" >删除</el-button>
<el-button type="primary" @click="saveAndCharge" >收费</el-button> <el-button type="primary" @click="saveAndCharge" >收费</el-button>
<el-button type="primary" >追溯码</el-button> <el-button type="primary" >追溯码</el-button>
<el-button type="primary" >挂单</el-button> <el-button type="primary" >挂单</el-button>
</div>
</template> </template>
<el-form :model="formData" inline label-width="0"> <el-form :model="formData" inline label-width="0">
<el-form-item> <el-form-item>
@ -56,11 +59,11 @@
</Panel> </Panel>
<Panel title="服务项目"> <Panel title="服务项目">
<ServiceDetail v-model="formData.itemDetail" @selectedCallBack =getOrderTotalPrice> </ServiceDetail> <ServiceDetail v-model="formData" @totalPriceChange="getOrderTotalPrice"> </ServiceDetail>
</Panel> </Panel>
<Panel title="药品耗材"> <Panel title="药品耗材">
<GoodsDetail v-model="formData.goodsDetail" @totalPriceChange="getOrderTotalPrice"></GoodsDetail> <GoodsDetail v-model="formData" @totalPriceChange="getOrderTotalPrice" ></GoodsDetail>
</Panel> </Panel>
</div> </div>
<div class="right"> <div class="right">
@ -74,6 +77,8 @@
:money="formData.totalPrice" :money="formData.totalPrice"
ref="settlementRef" ref="settlementRef"
v-model="socialCard" v-model="socialCard"
@orderCompleted="orderCompleted"
@orderCanceled="orderCanceled"
></Settlement> ></Settlement>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -93,10 +98,10 @@ const formData = ref<any>({
diagnosisMedicalRecord:{}, diagnosisMedicalRecord:{},
}) })
const diagnosisKeyword = ref("") const diagnosisKeyword = ref("")
const chargeQueue = ref() const chargeQueueRef = ref()
const delDraft = () => { const delDraft = () => {
nextTick(() => { nextTick(() => {
chargeQueue.value?.delDraft() chargeQueueRef.value?.delDraft()
}) })
} }
const settlementRef = ref() const settlementRef = ref()
@ -104,7 +109,7 @@ const saveAndCharge = () => {
post('charge/save', {data:formData.value}).then((res: any) => { post('charge/save', {data:formData.value}).then((res: any) => {
formData.value.code = res formData.value.code = res
nextTick(()=>{ nextTick(()=>{
settlementRef.value?.init(formData.value) settlementRef.value?.init(res)
}) })
}) })
} }
@ -141,13 +146,26 @@ const getDockerList = () => {
dockerList.value = res dockerList.value = res
}) })
} }
const orderCompleted = () => {
nextTick(()=>{
chargeQueueRef.value?.getOrderList()
})
}
const orderCanceled = () => {
nextTick(()=>{
chargeQueueRef.value?.getOrderList()
})
}
onMounted(()=>{ onMounted(()=>{
getDockerList() getDockerList()
}) })
const getOrderTotalPrice = () => { const getOrderTotalPrice = () => {
let totalPrice = 0 let totalPrice = 0
formData.value.itemDetail.forEach((item: any) => { formData.value.itemDetail.forEach((item: any) => {
totalPrice += item.unitPrice * item.number totalPrice += item.selectedPrice * item.selectedNum
}) })
formData.value.goodsDetail.forEach((item: any) => { formData.value.goodsDetail.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum totalPrice += item.selectedPrice * item.selectedNum

View File

@ -56,7 +56,7 @@ const registerId = ref()
const patientId = ref() const patientId = ref()
const itemList = ref([]) const itemList = ref([])
const goodsList = ref([]) const goodsList = ref([])
const formData = ref<any>({}) const formData = ref<any>({diagType:1})
const save = () => { const save = () => {
let json = { let json = {
chinaAdjunctCheck: formData.value.chinaAdjunctCheck, chinaAdjunctCheck: formData.value.chinaAdjunctCheck,
@ -74,6 +74,7 @@ const save = () => {
exam: formData.value.exam, exam: formData.value.exam,
diagnosisDetail: formData.value.diagnosisDetail, diagnosisDetail: formData.value.diagnosisDetail,
diagnosisSummary: formData.value.diagnosisSummary, diagnosisSummary: formData.value.diagnosisSummary,
diagType:formData.value.diagType
} }
const data = { const data = {
registrationId: registerId.value, registrationId: registerId.value,
@ -138,7 +139,7 @@ const edit = () => {
// 使 watch goodsList itemList // 使 watch goodsList itemList
watch([() => goodsList.value, itemList], ([newGoodsList, newItemList]) => { watch([() => goodsList.value, itemList], ([newGoodsList, newItemList]) => {
const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => { const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => {
return pre + cur.unitPrice return pre + cur.unitPrice*cur.selectedNum
}, 0); }, 0);
const serviceTotalAmount = newGoodsList.reduce((pre: any, cur: any) => { const serviceTotalAmount = newGoodsList.reduce((pre: any, cur: any) => {
return pre + cur.selectedNum * cur.selectedPrice return pre + cur.selectedNum * cur.selectedPrice