dev
This commit is contained in:
parent
b4c33c8583
commit
cc18ac3f52
|
|
@ -1,7 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<panel title="药品耗材">
|
<panel title="药品耗材">
|
||||||
<el-table v-if="goodsDetail.length>0" :data="goodsDetail" max-height="150" style="width: 100%">
|
<el-table v-if="goodsDetail.length>0" :data="goodsDetail" max-height="150" style="width: 100%">
|
||||||
<el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="name" label="名称">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-popover
|
||||||
|
placement="top-start"
|
||||||
|
trigger="hover"
|
||||||
|
width="500"
|
||||||
|
@show="getHilistInfo(scope.row)"
|
||||||
|
@hide="colosInfo"
|
||||||
|
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
{{ scope.row.name }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="detail">
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
|
<div style="font-size: 18px;font-weight: 500;color: #000">{{
|
||||||
|
hilistInfo.name
|
||||||
|
}}[{{ hilistInfo.json?.category || '-' }}]
|
||||||
|
</div>
|
||||||
|
<div>¥{{ scope.row.selectedPrice }}/{{ scope.row.selectedUnit }}</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
|
<div>规格:{{ hilistInfo.json?.dosage_specifications || '-' }}</div>
|
||||||
|
<div>生产厂商:{{ hilistInfo.json?.producer || '-' }}</div>
|
||||||
|
<div>限价:{{ hilistInfo.json?.stock || '0' }}</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
|
<div>批准文号:{{ hilistInfo.json?.approval_number || '-' }}</div>
|
||||||
|
<div>本位码:{{ hilistInfo.json?.standard_code || '-' }}</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
|
<div>限价:{{ hilistInfo.hilistPricUplmtAmt ? hilistInfo.hilistPricUplmtAmt : '无' }}</div>
|
||||||
|
<div>限价类型:{{ hilistInfo.hilistLmtpricType ? hilistInfo.hilistLmtpricType : '无' }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="selectedPrice" label="单价">
|
<el-table-column prop="selectedPrice" label="单价">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
¥{{ scope.row.selectedPrice }}
|
¥{{ scope.row.selectedPrice }}
|
||||||
|
|
@ -49,6 +87,7 @@
|
||||||
:placeholder="'请输入药名或者拼音码'"
|
:placeholder="'请输入药名或者拼音码'"
|
||||||
@selectedCallBack="goodsSelect"
|
@selectedCallBack="goodsSelect"
|
||||||
v-if="status"
|
v-if="status"
|
||||||
|
@focus="focus"
|
||||||
></SearchInput>
|
></SearchInput>
|
||||||
</div>
|
</div>
|
||||||
<span>合计:¥{{ getTotalPrice() }}</span>
|
<span>合计:¥{{ getTotalPrice() }}</span>
|
||||||
|
|
@ -57,8 +96,10 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import SearchInput from "@/components/SearchInput.vue";
|
import SearchInput from "@/components/SearchInput.vue";
|
||||||
import {ref, watchEffect} from "vue";
|
|
||||||
import Panel from "@/components/common/Panel.vue";
|
import Panel from "@/components/common/Panel.vue";
|
||||||
|
import {ref} from "vue";
|
||||||
|
import {post} from "@/utils/request.ts";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
|
|
@ -90,6 +131,10 @@ 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
|
||||||
|
if (goodsDetail.value.find((i: any) => i.id == row.id)) {
|
||||||
|
ElMessage.warning("数据已存在,只能加数量")
|
||||||
|
return
|
||||||
|
}
|
||||||
goodsDetail.value.push(row)
|
goodsDetail.value.push(row)
|
||||||
emit('totalPriceChange')
|
emit('totalPriceChange')
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +148,7 @@ const selectUnit = (item: any, unit: any) => {
|
||||||
emit('totalPriceChange')
|
emit('totalPriceChange')
|
||||||
|
|
||||||
}
|
}
|
||||||
const emit = defineEmits(["totalPriceChange"])
|
const emit = defineEmits(["totalPriceChange", 'focus'])
|
||||||
const handleNumChange = () => {
|
const handleNumChange = () => {
|
||||||
emit('totalPriceChange')
|
emit('totalPriceChange')
|
||||||
}
|
}
|
||||||
|
|
@ -117,7 +162,20 @@ const getTotalPrice = () => {
|
||||||
|
|
||||||
return totalPrice;
|
return totalPrice;
|
||||||
}
|
}
|
||||||
|
const focus = (e: any) => {
|
||||||
|
emit('focus', e)
|
||||||
|
}
|
||||||
|
const hilistInfo = ref<any>({})
|
||||||
|
const getHilistInfo = (item: any) => {
|
||||||
|
if (item.hilistCode) {
|
||||||
|
post("social/directory/getByCode", {code: item.hilistCode}).then((res: any) => {
|
||||||
|
hilistInfo.value = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const colosInfo = () => {
|
||||||
|
hilistInfo.value = {}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-table__cell) {
|
:deep(.el-table__cell) {
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ import SearchInput from "@/components/SearchInput.vue";
|
||||||
import Panel from "@/components/common/Panel.vue";
|
import Panel from "@/components/common/Panel.vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import chrgitm_lv from "@/assets/config/directory/chrgitmLv.json"
|
import chrgitm_lv from "@/assets/config/directory/chrgitmLv.json"
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
|
|
@ -102,6 +103,10 @@ const serviceSelect = (row: any) => {
|
||||||
row.selectedNum = 1
|
row.selectedNum = 1
|
||||||
row.selectedUnit = row.unit
|
row.selectedUnit = row.unit
|
||||||
row.selectedPrice = row.unitPrice
|
row.selectedPrice = row.unitPrice
|
||||||
|
if (itemDetail.value.find((i: any) => i.id == row.id)) {
|
||||||
|
ElMessage.warning("数据已存在,只能加数量")
|
||||||
|
return
|
||||||
|
}
|
||||||
itemDetail.value.push(row)
|
itemDetail.value.push(row)
|
||||||
emit('totalPriceChange')
|
emit('totalPriceChange')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<Settlement v-model="totalAmount" @cancelReception="cancelReception" @save="save" :status="curRegister?.status ==2"
|
<Settlement v-model="formData.totalPrice" @cancelReception="cancelReception" @save="save" :status="curRegister?.status ==2"
|
||||||
@edit="edit"></Settlement>
|
@edit="edit"></Settlement>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -167,16 +167,6 @@ const getOrderTotalPrice = () => {
|
||||||
formData.value.preTotalPrice = totalPrice
|
formData.value.preTotalPrice = totalPrice
|
||||||
formData.value.totalPrice = totalPrice
|
formData.value.totalPrice = totalPrice
|
||||||
}
|
}
|
||||||
// 使用 watch 监听 goodsList 和 itemList 的变化
|
|
||||||
watch([() => goodsList.value, itemDetail], ([newGoodsList, newItemList]) => {
|
|
||||||
const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => {
|
|
||||||
return pre + cur.unitPrice * cur.selectedNum
|
|
||||||
}, 0);
|
|
||||||
const serviceTotalAmount = newGoodsList.reduce((pre: any, cur: any) => {
|
|
||||||
return pre + cur.selectedNum * cur.selectedPrice
|
|
||||||
}, 0);
|
|
||||||
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
|
|
||||||
}, {deep: true});
|
|
||||||
const caseRef= ref<any>("")
|
const caseRef= ref<any>("")
|
||||||
const copyForm=(item:any) => {
|
const copyForm=(item:any) => {
|
||||||
formData.value = item.diagnosisMedicalRecord
|
formData.value = item.diagnosisMedicalRecord
|
||||||
|
|
@ -193,7 +183,6 @@ const copyGoodsList=(item:any) => {
|
||||||
goodsList.value = item.goodsDetail
|
goodsList.value = item.goodsDetail
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const seeDockerInfo = ref<any>()
|
const seeDockerInfo = ref<any>()
|
||||||
const getSeeDockerInfo = (newValue:any) => {
|
const getSeeDockerInfo = (newValue:any) => {
|
||||||
if (!registerId.value)return;
|
if (!registerId.value)return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue