From 1386dbaf3dccc140a2ef7468490fc43c57bc7b2f Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Thu, 8 May 2025 16:49:32 +0800 Subject: [PATCH] dev --- src/components/SearchInput.vue | 15 ++-- src/components/common/goods/GoodsDetail.vue | 30 +++++++- .../common/service/ServiceDetail.vue | 28 ++++++-- .../outpatient/DiagnosisSearchInput.vue | 1 - src/views/charge/index.vue | 68 +++++++++---------- 5 files changed, 90 insertions(+), 52 deletions(-) diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue index 858c73e..69ffdb4 100644 --- a/src/components/SearchInput.vue +++ b/src/components/SearchInput.vue @@ -28,7 +28,8 @@ @@ -90,7 +91,7 @@ const changeInput = (inputStr: string) => { }; -const emit = defineEmits(['selectedCallBack','focus']); +const emit = defineEmits(['selectedCallBack', 'focus']); const clickRow = (row: any) => { emit('selectedCallBack', row); @@ -103,11 +104,11 @@ const beforeShow = () => { popoverRef.value.hide(); } }; -const isVisible =ref(false) -const focus=()=>{ - isVisible.value=true - console.log( "focus输入框") - emit('focus',true) +const isVisible = ref(false) +const focus = () => { + isVisible.value = true + console.log("focus输入框") + emit('focus', true) } const handlerBlur = () => { isVisible.value = false diff --git a/src/components/common/goods/GoodsDetail.vue b/src/components/common/goods/GoodsDetail.vue index a62df5f..d73078f 100644 --- a/src/components/common/goods/GoodsDetail.vue +++ b/src/components/common/goods/GoodsDetail.vue @@ -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) diff --git a/src/components/common/service/ServiceDetail.vue b/src/components/common/service/ServiceDetail.vue index fb56c6e..521fefd 100644 --- a/src/components/common/service/ServiceDetail.vue +++ b/src/components/common/service/ServiceDetail.vue @@ -1,7 +1,7 @@