Compare commits
No commits in common. "00f1cc5c53b3bea1efd54f066060b0f139b0e629" and "8d1da786ca8443c12d1ba5f374648c02ee151be6" have entirely different histories.
00f1cc5c53
...
8d1da786ca
|
|
@ -29,6 +29,7 @@
|
||||||
v-for="item in showConfig"
|
v-for="item in showConfig"
|
||||||
:prop="item.prop"
|
:prop="item.prop"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
|
show-overflow-tooltip
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -57,7 +58,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
width: {
|
width: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 800
|
default: 600
|
||||||
},
|
},
|
||||||
showConfig: {
|
showConfig: {
|
||||||
type: Array as () => showConfig[],
|
type: Array as () => showConfig[],
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
<template>
|
||||||
|
<el-table :data="data.itemDetail" max-height="150">
|
||||||
|
<el-table-column prop="itemName" label="项目名称" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="单价">
|
||||||
|
<template #default="scope">
|
||||||
|
¥{{scope.row.selectedPrice}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input-number v-model="scope.row.selectedNum" min="0"
|
||||||
|
@change="handleNumChange" v-if="data.status == 0" size="small"></el-input-number>
|
||||||
|
<span v-else>{{scope.row.selectedNum}}</span>
|
||||||
|
{{scope.row.selectedUnit}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小计">
|
||||||
|
<template #default="scope">
|
||||||
|
¥{{scope.row.selectedNum*scope.row.selectedPrice}}
|
||||||
|
</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>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="bottom">
|
||||||
|
<SearchInput v-if="data.status == 0" :request-api="serviceSearchApi" :show-config="serviceShowConfig"
|
||||||
|
@selectedCallBack="serviceSelect"></SearchInput>
|
||||||
|
<span>合计:¥{{getTotalPrice()}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import SearchInput from "@/components/SearchInput.vue";
|
||||||
|
|
||||||
|
const data = defineModel<any>();
|
||||||
|
const delService = (item: any) => {
|
||||||
|
data.value.itemDetail = data.value.itemDetail.filter((i: any) => i.id != item.id)
|
||||||
|
}
|
||||||
|
const serviceSearchApi = "item/search";
|
||||||
|
const serviceShowConfig = [
|
||||||
|
{
|
||||||
|
label: "服务名称",
|
||||||
|
prop: "itemName",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "服务医保码",
|
||||||
|
prop: "itemSocialCode",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "售价",
|
||||||
|
prop: "unitPrice",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const emit = defineEmits(['totalPriceChange'])
|
||||||
|
const serviceSelect = (row: any) => {
|
||||||
|
row.selectedNum = 1
|
||||||
|
row.selectedUnit = row.unit
|
||||||
|
row.selectedPrice = row.unitPrice
|
||||||
|
data.value.itemDetail.push(row)
|
||||||
|
emit('totalPriceChange', row)
|
||||||
|
}
|
||||||
|
const handleNumChange = () => {
|
||||||
|
emit('totalPriceChange')
|
||||||
|
}
|
||||||
|
|
||||||
|
const getTotalPrice =()=>{
|
||||||
|
let totalPrice = 0;
|
||||||
|
data.value.itemDetail?.forEach((item:any)=>{
|
||||||
|
totalPrice += item.selectedNum*item.selectedPrice
|
||||||
|
})
|
||||||
|
return totalPrice;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
:deep(.el-table__cell){
|
||||||
|
padding: 0 4px;
|
||||||
|
}
|
||||||
|
.bottom{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,110 +0,0 @@
|
||||||
<template>
|
|
||||||
<Panel title="服务项目">
|
|
||||||
<el-table v-if="itemDetail.length>0" :data="itemDetail" max-height="150">
|
|
||||||
<el-table-column prop="itemName" label="项目名称" show-overflow-tooltip></el-table-column>
|
|
||||||
<el-table-column label="单价">
|
|
||||||
<template #default="scope">
|
|
||||||
¥{{ scope.row.selectedPrice }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-input-number v-if="disabled||props.status==0" v-model="scope.row.selectedNum" min="0"
|
|
||||||
@change="handleNumChange" size="small"></el-input-number>
|
|
||||||
<span v-else>{{ scope.row.selectedNum }}</span>
|
|
||||||
{{ scope.row.selectedUnit }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="小计">
|
|
||||||
<template #default="scope">
|
|
||||||
¥{{ scope.row.selectedNum * scope.row.selectedPrice }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button type="danger" link @click="delService(scope.row)">X</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="bottom">
|
|
||||||
<SearchInput :request-api="serviceSearchApi"
|
|
||||||
:show-config="serviceShowConfig"
|
|
||||||
:disabled="!disabled"
|
|
||||||
@selectedCallBack="serviceSelect"></SearchInput>
|
|
||||||
<span>合计:¥{{ getTotalPrice() || 0 }}</span>
|
|
||||||
</div>
|
|
||||||
</Panel>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import {defineProps, watchEffect, ref} from "vue";
|
|
||||||
import SearchInput from "@/components/SearchInput.vue";
|
|
||||||
import Panel from "@/components/common/Panel.vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
status: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const itemDetail = defineModel<any>();
|
|
||||||
|
|
||||||
const delService = (item: any) => {
|
|
||||||
itemDetail.value = itemDetail.value.filter((i: any) => i.id != item.id)
|
|
||||||
}
|
|
||||||
const serviceSearchApi = "item/search";
|
|
||||||
const serviceShowConfig = [
|
|
||||||
{
|
|
||||||
label: "服务名称",
|
|
||||||
prop: "itemName",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "服务医保码",
|
|
||||||
prop: "itemSocialCode",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "售价",
|
|
||||||
prop: "unitPrice",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const emit = defineEmits(['totalPriceChange'])
|
|
||||||
const serviceSelect = (row: any) => {
|
|
||||||
row.selectedNum = 1
|
|
||||||
row.selectedUnit = row.unit
|
|
||||||
row.selectedPrice = row.unitPrice
|
|
||||||
itemDetail.value.push(row)
|
|
||||||
emit('totalPriceChange')
|
|
||||||
}
|
|
||||||
const handleNumChange = () => {
|
|
||||||
emit('totalPriceChange')
|
|
||||||
}
|
|
||||||
|
|
||||||
const getTotalPrice = () => {
|
|
||||||
let totalPrice = 0;
|
|
||||||
if (itemDetail.value) {
|
|
||||||
itemDetail.value.forEach((item: any) => {
|
|
||||||
totalPrice += item.selectedNum * item.selectedPrice
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return totalPrice;
|
|
||||||
}
|
|
||||||
const disabled = ref<any>(false)
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
if (props.status == 2 || props.status == 0) {
|
|
||||||
disabled.value = true
|
|
||||||
} else {
|
|
||||||
disabled.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
:deep(.el-table__cell) {
|
|
||||||
padding: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -47,7 +47,9 @@
|
||||||
</Panel>
|
</Panel>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<ServiceDetail v-model="formData.itemDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
<Panel title="服务项目">
|
||||||
|
<ServiceDetail v-model="formData" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||||
|
</Panel>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<Panel title="药品耗材">
|
<Panel title="药品耗材">
|
||||||
|
|
@ -82,7 +84,7 @@ import Panel from "@/components/common/Panel.vue";
|
||||||
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
||||||
import {nextTick, onMounted, ref} from "vue";
|
import {nextTick, onMounted, ref} from "vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
import ServiceDetail from "@/components/charge/ServiceDetail.vue";
|
||||||
import GoodsDetail from "@/components/charge/GoodsDetail.vue";
|
import GoodsDetail from "@/components/charge/GoodsDetail.vue";
|
||||||
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
|
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
|
||||||
import Settlement from "@/components/charge/Settlement.vue";
|
import Settlement from "@/components/charge/Settlement.vue";
|
||||||
|
|
@ -98,8 +100,6 @@ const socialCard = ref<any>({payInfo: {}})
|
||||||
const formData = ref<any>({
|
const formData = ref<any>({
|
||||||
patientInfo: {},
|
patientInfo: {},
|
||||||
diagnosisMedicalRecord: {},
|
diagnosisMedicalRecord: {},
|
||||||
goodsList: [],
|
|
||||||
itemDetail: [],
|
|
||||||
})
|
})
|
||||||
const statusDisabled = ref(0)
|
const statusDisabled = ref(0)
|
||||||
const diagnosisKeyword = ref("")
|
const diagnosisKeyword = ref("")
|
||||||
|
|
@ -177,10 +177,10 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
const getOrderTotalPrice = () => {
|
const getOrderTotalPrice = () => {
|
||||||
let totalPrice = 0
|
let totalPrice = 0
|
||||||
formData.value.itemDetail?.forEach((item: any) => {
|
formData.value.itemDetail.forEach((item: any) => {
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
totalPrice += item.selectedPrice * item.selectedNum
|
||||||
})
|
})
|
||||||
formData.value.goodsList.forEach((item: any) => {
|
formData.value.goodsDetail.forEach((item: any) => {
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
totalPrice += item.selectedPrice * item.selectedNum
|
||||||
})
|
})
|
||||||
formData.value.preTotalPrice = totalPrice
|
formData.value.preTotalPrice = totalPrice
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
<Case ref="caseRef" v-else v-model="formData" :status="status" :isShowFrom="isShowFrom" @focus="focus"></Case>
|
<Case ref="caseRef" v-else v-model="formData" :status="status" :isShowFrom="isShowFrom" @focus="focus"></Case>
|
||||||
</div>
|
</div>
|
||||||
<div class="service-items">
|
<div class="service-items">
|
||||||
<!-- <ServiceItemsDetail v-if="patientRegistration.status==3" v-model="itemList"></ServiceItemsDetail>-->
|
<ServiceItemsDetail v-if="patientRegistration.status==3" v-model="itemList"></ServiceItemsDetail>
|
||||||
<ServiceDetail v-model="formData.itemDetail" :status="status" @focus="focus" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
<ServiceItems v-else v-model="itemList" :status="status" @focus="focus"></ServiceItems>
|
||||||
</div>
|
</div>
|
||||||
<div class="pharmaceutical-consumables">
|
<div class="pharmaceutical-consumables">
|
||||||
<PharmaceuticalConsumablesDetail v-if="patientRegistration.status==3"
|
<PharmaceuticalConsumablesDetail v-if="patientRegistration.status==3"
|
||||||
|
|
@ -53,17 +53,12 @@ import PharmaceuticalConsumablesDetail from "@/components/outpatient/Pharmaceuti
|
||||||
import CaseDetail from "@/components/outpatient/CaseDetail.vue";
|
import CaseDetail from "@/components/outpatient/CaseDetail.vue";
|
||||||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||||
import PatientCard from "@/components/charge/PatientCard.vue";
|
import PatientCard from "@/components/charge/PatientCard.vue";
|
||||||
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
|
||||||
|
|
||||||
const registerId = ref()
|
const registerId = ref()
|
||||||
const patientId = ref()
|
const patientId = ref()
|
||||||
const itemDetail = ref([])
|
const itemList = ref([])
|
||||||
const goodsList = ref([])
|
const goodsList = ref([])
|
||||||
const formData = ref<any>({
|
const formData = ref<any>({diagType: 1})
|
||||||
diagType: 1,
|
|
||||||
itemDetail: [],
|
|
||||||
goodsDetail: [],
|
|
||||||
})
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
let json = {
|
let json = {
|
||||||
chinaAdjunctCheck: formData.value.chinaAdjunctCheck,
|
chinaAdjunctCheck: formData.value.chinaAdjunctCheck,
|
||||||
|
|
@ -86,7 +81,7 @@ const save = () => {
|
||||||
const data = {
|
const data = {
|
||||||
registrationId: registerId.value,
|
registrationId: registerId.value,
|
||||||
patientId: patientId.value,
|
patientId: patientId.value,
|
||||||
itemList: itemDetail.value,
|
itemList: itemList.value,
|
||||||
goodsList: goodsList.value,
|
goodsList: goodsList.value,
|
||||||
diagnosisMedicalRecord: medicalRecord,
|
diagnosisMedicalRecord: medicalRecord,
|
||||||
|
|
||||||
|
|
@ -127,7 +122,7 @@ const getId = (item: any) => {
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
formData.value = res.diagnosisMedicalRecord
|
formData.value = res.diagnosisMedicalRecord
|
||||||
goodsList.value = res.goodsDetail
|
goodsList.value = res.goodsDetail
|
||||||
itemDetail.value = res.itemDetail
|
itemList.value = res.itemDetail
|
||||||
patientRegistration.value = res.patientRegistration
|
patientRegistration.value = res.patientRegistration
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -146,10 +141,9 @@ const deleteItem = () => {
|
||||||
}
|
}
|
||||||
const getStatus = (e: any) => {
|
const getStatus = (e: any) => {
|
||||||
status.value = e
|
status.value = e
|
||||||
|
formData.value = {}
|
||||||
formData.value.itemDetail = []
|
goodsList.value = []
|
||||||
// goodsList.value = []
|
itemList.value = []
|
||||||
// itemDetail.value = []
|
|
||||||
patientRegistration.value = {}
|
patientRegistration.value = {}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
medicalHistoryRef.value?.clearList();
|
medicalHistoryRef.value?.clearList();
|
||||||
|
|
@ -161,19 +155,8 @@ const edit = () => {
|
||||||
status.value = 2
|
status.value = 2
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getOrderTotalPrice = () => {
|
|
||||||
let totalPrice = 0
|
|
||||||
formData.value.itemDetail?.forEach((item: any) => {
|
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
|
||||||
})
|
|
||||||
formData.value.goodsDetail?.forEach((item: any) => {
|
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
|
||||||
})
|
|
||||||
formData.value.preTotalPrice = totalPrice
|
|
||||||
formData.value.totalPrice = totalPrice
|
|
||||||
}
|
|
||||||
// 使用 watch 监听 goodsList 和 itemList 的变化
|
// 使用 watch 监听 goodsList 和 itemList 的变化
|
||||||
watch([() => goodsList.value, itemDetail], ([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 * cur.selectedNum
|
return pre + cur.unitPrice * cur.selectedNum
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
@ -193,7 +176,7 @@ const copyForm=(item:any) => {
|
||||||
}
|
}
|
||||||
const copyItemList=(item:any) => {
|
const copyItemList=(item:any) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
itemDetail.value = item.itemDetail
|
itemList.value = item.itemDetail
|
||||||
}
|
}
|
||||||
const copyGoodsList=(item:any) => {
|
const copyGoodsList=(item:any) => {
|
||||||
goodsList.value = item.goodsDetail
|
goodsList.value = item.goodsDetail
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue