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;
flex-wrap: wrap;
padding: 5px 0;
border-bottom: 1px solid #fffeee;
border-bottom: 1px solid #DDDDDD;
.code-item-name{
float: left;
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"
:key="index" @click="clickItem(item)">
<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="头像"/>
<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="头像"/>
</span>
<span class="item_name">{{ item.patientName }}</span>
<span class="item_name">{{ item.patientInfo.name }}</span>
<el-tooltip
class="box-item"
effect="dark"
:content="formatTime(item.createDatetime)||'-'"
:content="formatTime(item.patientRegistration.createDatetime)||'-'"
placement="bottom-start"
>
<span class="item_time">
{{ formatTime(item.createDatetime) || '-' }}
{{ formatTime(item.patientRegistration.createDatetime) || '-' }}
</span>
</el-tooltip>
<span>01-01</span>
<span :class="[item.status == 0 ?'status-active':'']">{{item.status == 0 ? '未收' : '已收'}}</span>
</li>
</ul>
</el-scrollbar>
@ -81,7 +81,7 @@ const delDraft = () =>{
orderList.value.shift();
clickFirst()
}
defineExpose({delDraft})
defineExpose({delDraft,getOrderList})
onMounted(()=>{
getOrderList()
})
@ -151,6 +151,7 @@ onMounted(()=>{
}
}
&:hover {
background: rgba(#4D6DE4, 0.1);
}
@ -169,8 +170,12 @@ onMounted(()=>{
text-overflow: ellipsis; //
}
}
}
.status-active{
font-weight: bold;
color: #409EFF;
}
.active {
color: #fff;
background: #4D6DE4;

View File

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

View File

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

View File

@ -1,10 +1,19 @@
<template>
<el-table :data="list" max-height="150">
<el-table-column prop="name" label="名称"></el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column>
<el-table-column prop="unitPrice" label="单价"></el-table-column>
<el-table-column prop="number" label="数量"></el-table-column>
<el-table-column label="操作">
<el-table :data="data.itemDetail" max-height="150">
<el-table-column prop="itemName" label="名称"></el-table-column>
<el-table-column prop="selectedUnit" label="单位"></el-table-column>
<el-table-column prop="selectedPrice" label="单价"></el-table-column>
<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">
<el-button type="danger" link @click="delService(scope.row)">X</el-button>
</template>
@ -15,9 +24,9 @@
<script setup lang="ts">
import SearchInput from "@/components/SearchInput.vue";
const list =defineModel<any>();
const data =defineModel<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";
@ -35,12 +44,16 @@ const serviceShowConfig = [
prop: "unitPrice",
},
]
const emit = defineEmits(['selectedCallBack'])
const emit = defineEmits(['totalPriceChange'])
const serviceSelect = (row: any) => {
row.name = row.itemName
row.number = 1
list.value.push(row)
emit('selectedCallBack',row)
row.selectedNum = 1
row.selectedUnit = row.unit
row.selectedPrice = row.unitPrice
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 payType = ref(null);
const retailOrder = ref<any>(null);
const init = (order: any) => {
retailOrder.value = order;
console.log(order)
const init = (code: any) => {
post ('charge/getByCode',{code:code}).then((res:any)=>{
retailOrder.value = res;
})
show.value = true;
}
defineExpose({init})
@ -131,7 +132,7 @@ const socialSettlement = ()=>{
const psnPaymentRef = ref();
const openPsnPayment = (payInfo:any,orderInfo:any)=>{
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;
show.value = true;
init_search_data()
debugger
if (keyword.value && keyword.value != ""){
search_social()
}
};
defineExpose({init});

View File

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

View File

@ -8,7 +8,7 @@
<span class="name">{{ item.name }}</span>
<span class="type">{{ item.type }}</span>
<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>
<span style="line-height: 30px;margin-left: 10px">{{ item.selectedUnit }}</span>
<template #dropdown>

View File

@ -6,8 +6,12 @@
<li class="item" v-for="(item, index) in list" :key="index">
<span class="index">{{ index + 1 }}</span>
<span class="name">{{ item.itemName }}</span>
<span class="code">{{ item.itemSocialCode }}</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">
<el-button @click="deleteItem(item.id)">
<el-icon><CircleClose/></el-icon>
@ -26,7 +30,7 @@
>
</SearchInput>
</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>
</Panel>
</template>
@ -51,6 +55,7 @@ const serviceShowConfig = [
},
]
const serviceSelect = (row: any) => {
row.selectedNum = 1
list.value.push(row)
}
@ -75,6 +80,7 @@ const deleteItem = (id: any) => {
display: flex;
align-items: center;
justify-content: space-between;
.index {
height: 100%;
width: 50px;
@ -82,6 +88,7 @@ const deleteItem = (id: any) => {
border-right: 1px solid #EAEAEC;
line-height: 64px;
}
.name {
flex: 1;
margin-left: 10px;
@ -89,6 +96,7 @@ const deleteItem = (id: any) => {
height: 100%;
line-height: 64px;
}
.code {
flex: 1;
margin-left: 10px;
@ -96,6 +104,7 @@ const deleteItem = (id: any) => {
height: 100%;
line-height: 64px;
}
.price {
height: 100%;
width: 200px;
@ -103,6 +112,7 @@ const deleteItem = (id: any) => {
border-right: 1px solid #EAEAEC;
text-align: center;
}
.delete {
height: 100%;
width: 50px;
@ -117,6 +127,7 @@ const deleteItem = (id: any) => {
border-top: 1px solid #EAEAEC;
display: flex;
align-items: center;
.search-input {
height: 100%;
flex: 1;

View File

@ -5,16 +5,16 @@
<ul>
<li class="item" v-for="(item, index) in list" :key="index">
<span class="index">{{ index + 1 }}</span>
<span class="name">{{ item.name }}</span>
<span class="code">{{ item.socialCode }}</span>
<span class="unit">{{ item.unit }}</span>
<span class="price">{{ item.unitPrice }}</span>
<span class="name">{{ item.itemName }}</span>
<span class="code">{{ item.itemSocialCode }}</span>
<span class="unit">{{item.selectedNum}}{{ item.selectedUnit }}</span>
<span class="price">{{ item.selectedPrice }}</span>
</li>
</ul>
</div>
<div class="search">
<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>
</Panel>

View File

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

View File

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