diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue
index 56219e9..858c73e 100644
--- a/src/components/SearchInput.vue
+++ b/src/components/SearchInput.vue
@@ -29,7 +29,6 @@
v-for="item in showConfig"
:prop="item.prop"
:label="item.label"
- show-overflow-tooltip
>
@@ -58,7 +57,7 @@ const props = defineProps({
},
width: {
type: Number,
- default: 600
+ default: 800
},
showConfig: {
type: Array as () => showConfig[],
diff --git a/src/components/charge/ServiceDetail.vue b/src/components/charge/ServiceDetail.vue
deleted file mode 100644
index c7643bb..0000000
--- a/src/components/charge/ServiceDetail.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
- ¥{{scope.row.selectedPrice}}
-
-
-
-
-
- {{scope.row.selectedNum}}
- {{scope.row.selectedUnit}}
-
-
-
-
- ¥{{scope.row.selectedNum*scope.row.selectedPrice}}
-
-
-
-
- X
-
-
-
-
-
- 合计:¥{{getTotalPrice()}}
-
-
-
-
-
\ No newline at end of file
diff --git a/src/components/common/service/ServiceDetail.vue b/src/components/common/service/ServiceDetail.vue
new file mode 100644
index 0000000..2d317d6
--- /dev/null
+++ b/src/components/common/service/ServiceDetail.vue
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+ ¥{{ scope.row.selectedPrice }}
+
+
+
+
+
+ {{ scope.row.selectedNum }}
+ {{ scope.row.selectedUnit }}
+
+
+
+
+ ¥{{ scope.row.selectedNum * scope.row.selectedPrice }}
+
+
+
+
+ X
+
+
+
+
+
+ 合计:¥{{ getTotalPrice() || 0 }}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/charge/index.vue b/src/views/charge/index.vue
index 7059884..b894423 100644
--- a/src/views/charge/index.vue
+++ b/src/views/charge/index.vue
@@ -47,9 +47,7 @@
@@ -84,7 +82,7 @@ import Panel from "@/components/common/Panel.vue";
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
import {nextTick, onMounted, ref} from "vue";
import {post} from "@/utils/request.ts";
-import ServiceDetail from "@/components/charge/ServiceDetail.vue";
+import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
import GoodsDetail from "@/components/charge/GoodsDetail.vue";
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
import Settlement from "@/components/charge/Settlement.vue";
@@ -100,6 +98,8 @@ const socialCard = ref({payInfo: {}})
const formData = ref({
patientInfo: {},
diagnosisMedicalRecord: {},
+ goodsList: [],
+ itemDetail: [],
})
const statusDisabled = ref(0)
const diagnosisKeyword = ref("")
@@ -177,10 +177,10 @@ onMounted(() => {
})
const getOrderTotalPrice = () => {
let totalPrice = 0
- formData.value.itemDetail.forEach((item: any) => {
+ formData.value.itemDetail?.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
})
- formData.value.goodsDetail.forEach((item: any) => {
+ formData.value.goodsList.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
})
formData.value.preTotalPrice = totalPrice
diff --git a/src/views/outpatient/index.vue b/src/views/outpatient/index.vue
index bb44f27..05a3da3 100644
--- a/src/views/outpatient/index.vue
+++ b/src/views/outpatient/index.vue
@@ -10,8 +10,8 @@
-
-
+
+
({diagType: 1})
+const formData = ref({
+ diagType: 1,
+ itemDetail: [],
+ goodsDetail: [],
+})
const save = () => {
let json = {
chinaAdjunctCheck: formData.value.chinaAdjunctCheck,
@@ -81,7 +86,7 @@ const save = () => {
const data = {
registrationId: registerId.value,
patientId: patientId.value,
- itemList: itemList.value,
+ itemList: itemDetail.value,
goodsList: goodsList.value,
diagnosisMedicalRecord: medicalRecord,
@@ -122,7 +127,7 @@ const getId = (item: any) => {
}).then((res: any) => {
formData.value = res.diagnosisMedicalRecord
goodsList.value = res.goodsDetail
- itemList.value = res.itemDetail
+ itemDetail.value = res.itemDetail
patientRegistration.value = res.patientRegistration
})
@@ -141,9 +146,10 @@ const deleteItem = () => {
}
const getStatus = (e: any) => {
status.value = e
- formData.value = {}
- goodsList.value = []
- itemList.value = []
+
+ formData.value.itemDetail = []
+ // goodsList.value = []
+ // itemDetail.value = []
patientRegistration.value = {}
nextTick(() => {
medicalHistoryRef.value?.clearList();
@@ -155,8 +161,19 @@ const edit = () => {
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.value, itemList], ([newGoodsList, newItemList]) => {
+watch([() => goodsList.value, itemDetail], ([newGoodsList, newItemList]) => {
const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => {
return pre + cur.unitPrice * cur.selectedNum
}, 0);
@@ -176,7 +193,7 @@ const copyForm=(item:any) => {
}
const copyItemList=(item:any) => {
console.log(item)
- itemList.value = item.itemDetail
+ itemDetail.value = item.itemDetail
}
const copyGoodsList=(item:any) => {
goodsList.value = item.goodsDetail