dev
This commit is contained in:
parent
cc18ac3f52
commit
1386dbaf3d
|
|
@ -28,7 +28,8 @@
|
|||
<el-table-column
|
||||
v-for="item in showConfig"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:label="item.label||'-'"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -119,13 +119,33 @@ const goodsShowConfig = [
|
|||
prop: "name",
|
||||
},
|
||||
{
|
||||
label: "项目类型",
|
||||
prop: "type",
|
||||
label: "规格",
|
||||
prop: "specifications",
|
||||
},
|
||||
{
|
||||
label: "售价",
|
||||
label: "库存",
|
||||
prop: "inventory",
|
||||
},
|
||||
{
|
||||
label: "价格",
|
||||
prop: "unitPrice",
|
||||
},
|
||||
{
|
||||
label: "厂家",
|
||||
prop: "producer",
|
||||
},
|
||||
{
|
||||
label: "效期",
|
||||
prop: "lifespan",
|
||||
},
|
||||
{
|
||||
label: "收费项目等级",
|
||||
prop: "category",
|
||||
},
|
||||
{
|
||||
label: "限制条件",
|
||||
prop: "limit",
|
||||
}
|
||||
]
|
||||
const goodsSelect = (row: any) => {
|
||||
row.selectedNum = 1
|
||||
|
|
@ -133,6 +153,10 @@ const goodsSelect = (row: any) => {
|
|||
row.selectedPrice = row.unitPrice
|
||||
if (goodsDetail.value.find((i: any) => i.id == row.id)) {
|
||||
ElMessage.warning("数据已存在,只能加数量")
|
||||
goodsDetail.value.find((i: any) => i.id == row.id).selectedNum += 1
|
||||
goodsDetail.value.find((i: any) => i.id == row.id).selectedUnit = row.packagingUnit
|
||||
goodsDetail.value.find((i: any) => i.id == row.id).selectedPrice = row.unitPrice
|
||||
emit('totalPriceChange')
|
||||
return
|
||||
}
|
||||
goodsDetail.value.push(row)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<Panel title="服务项目">
|
||||
<el-table v-if="itemDetail.length>0" :data="itemDetail" max-height="150">
|
||||
<el-table-column prop="itemName" label="项目名称">
|
||||
<el-table-column prop="itemName" label="项目名称" show-overflow-tooltip width="200">
|
||||
<template #default="scope">
|
||||
<el-popover
|
||||
width="485"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
¥{{ scope.row.selectedPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<el-table-column label="数量" width="180">
|
||||
<template #default="scope">
|
||||
<el-input-number v-if="props.status" v-model="scope.row.selectedNum" :min="0"
|
||||
@change="handleNumChange" size="small"></el-input-number>
|
||||
|
|
@ -90,13 +90,22 @@ const serviceShowConfig = [
|
|||
prop: "itemName",
|
||||
},
|
||||
{
|
||||
label: "服务医保码",
|
||||
prop: "itemSocialCode",
|
||||
label: "单位",
|
||||
prop: "unit",
|
||||
},
|
||||
{
|
||||
label: "售价",
|
||||
prop: "unitPrice",
|
||||
},
|
||||
{
|
||||
label: "收费项目等级",
|
||||
prop: "chrgitmLv",
|
||||
},
|
||||
{
|
||||
label: "限制条件",
|
||||
prop: "limit",
|
||||
},
|
||||
|
||||
]
|
||||
const emit = defineEmits(['totalPriceChange', 'focus'])
|
||||
const serviceSelect = (row: any) => {
|
||||
|
|
@ -105,6 +114,10 @@ const serviceSelect = (row: any) => {
|
|||
row.selectedPrice = row.unitPrice
|
||||
if (itemDetail.value.find((i: any) => i.id == row.id)) {
|
||||
ElMessage.warning("数据已存在,只能加数量")
|
||||
itemDetail.value.find((i: any) => i.id == row.id).selectedNum += 1
|
||||
itemDetail.value.find((i: any) => i.id == row.id).selectedUnit = row.packagingUnit
|
||||
itemDetail.value.find((i: any) => i.id == row.id).selectedPrice = row.unitPrice
|
||||
emit('totalPriceChange')
|
||||
return
|
||||
}
|
||||
itemDetail.value.push(row)
|
||||
|
|
@ -146,6 +159,7 @@ const hide = () => {
|
|||
text-align: right;
|
||||
border-top: 1px solid #EAEAEC;
|
||||
display: flex;
|
||||
|
||||
.search {
|
||||
flex: 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
|
||||
|
||||
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef"
|
||||
@before-enter="beforeShow" @hide="afterShow">
|
||||
<template #reference>
|
||||
|
|
|
|||
|
|
@ -10,12 +10,11 @@
|
|||
<template #default>
|
||||
<div class="diagnosis-content">
|
||||
<div class="diagnosis">
|
||||
诊断:
|
||||
<div style="width: 62px">诊断:</div>
|
||||
<DiagnosisSearchInput
|
||||
v-model="diagnosisKeyword"
|
||||
:request-api="diagnosisSearchApi"
|
||||
:show-config="diagnosisShowConfig"
|
||||
:width="600"
|
||||
@selectedCallBack="diagnosisSelect"
|
||||
ref="diagnosisSearchRef"
|
||||
:show-header="false"
|
||||
|
|
@ -25,12 +24,13 @@
|
|||
</DiagnosisSearchInput>
|
||||
</div>
|
||||
<div class="doctor">
|
||||
医生:
|
||||
<div>医生:</div>
|
||||
<el-select
|
||||
v-model="formData.doctorId"
|
||||
@change="handleChange"
|
||||
clearable
|
||||
size="large">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in doctorList"
|
||||
:key="item.id"
|
||||
|
|
@ -40,17 +40,17 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</Panel>
|
||||
</div>
|
||||
<div style="margin-top: 24px">
|
||||
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0"
|
||||
@totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||
</div>
|
||||
<div style="margin-top: 24px">
|
||||
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0"
|
||||
@totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status"></TotalPrice>
|
||||
|
|
@ -174,7 +174,6 @@ onMounted(() => {
|
|||
list()
|
||||
})
|
||||
const getOrderTotalPrice = () => {
|
||||
debugger
|
||||
let totalPrice = 0
|
||||
formData.value.itemDetail?.forEach((item: any) => {
|
||||
totalPrice += item.selectedPrice * item.selectedNum
|
||||
|
|
@ -224,11 +223,11 @@ const list = () => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
.diagnosis-content {
|
||||
height: 64px;
|
||||
padding: 0 24px 24px;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.case {
|
||||
|
|
@ -285,6 +284,7 @@ const list = () => {
|
|||
|
||||
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 24px;
|
||||
height: 86px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue