Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
This commit is contained in:
commit
293a34114f
|
|
@ -1,116 +0,0 @@
|
|||
<template>
|
||||
<el-table :data="data.goodsDetail" max-height="150" style="width: 100%">
|
||||
<el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="selectedPrice" label="单价">
|
||||
<template #default="scope">
|
||||
¥{{ scope.row.selectedPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="number" label="数量">
|
||||
<template #default="scope">
|
||||
<div v-if="data.status == 0">
|
||||
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"
|
||||
size="small"></el-input-number>
|
||||
<el-dropdown>
|
||||
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu v-if="scope.row.trdnFlag == 1">
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.packagingUnit)">{{ scope.row.packagingUnit }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.minPackagingUnit)">
|
||||
{{ scope.row.minPackagingUnit }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>{{ scope.row.selectedNum }} {{ scope.row.selectedUnit }}</div>
|
||||
</div>
|
||||
|
||||
</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="delGoods(scope.row)">X</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="bottom">
|
||||
<SearchInput v-if="data.status == 0" :request-api="goodsSearchApi" :show-config="goodsShowConfig"
|
||||
@selectedCallBack="goodsSelect"></SearchInput>
|
||||
<span>合计:¥{{ getTotalPrice() }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import SearchInput from "@/components/SearchInput.vue";
|
||||
|
||||
const props = defineProps({
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const data = defineModel<any>();
|
||||
const delGoods = (item: any) => {
|
||||
data.value.goodsDetail = data.value.goodsDetail.filter((i: any) => i.id != item.id)
|
||||
}
|
||||
|
||||
const goodsSearchApi = "goods/goods/search";
|
||||
const goodsShowConfig = [
|
||||
{
|
||||
label: "项目名称",
|
||||
prop: "name",
|
||||
},
|
||||
{
|
||||
label: "项目类型",
|
||||
prop: "type",
|
||||
},
|
||||
{
|
||||
label: "售价",
|
||||
prop: "unitPrice",
|
||||
},
|
||||
]
|
||||
const goodsSelect = (row: any) => {
|
||||
row.selectedNum = 1
|
||||
row.selectedUnit = row.packagingUnit
|
||||
row.selectedPrice = row.unitPrice
|
||||
data.value.goodsDetail.push(row)
|
||||
emit('totalPriceChange')
|
||||
}
|
||||
const selectUnit = (item: any, unit: any) => {
|
||||
item.selectedUnit = unit;
|
||||
if (unit == item.packagingUnit) {
|
||||
item.selectedPrice = item.unitPrice
|
||||
} else if (unit == item.minPackagingUnit) {
|
||||
item.selectedPrice = item.disassemblyPrice
|
||||
}
|
||||
emit('totalPriceChange')
|
||||
|
||||
}
|
||||
const emit = defineEmits(["totalPriceChange"])
|
||||
const handleNumChange = () => {
|
||||
emit('totalPriceChange')
|
||||
}
|
||||
const getTotalPrice = () => {
|
||||
let totalPrice = 0;
|
||||
data.value.goodsDetail?.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>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
<template>
|
||||
<panel title="药品耗材">
|
||||
<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="selectedPrice" label="单价">
|
||||
<template #default="scope">
|
||||
¥{{ scope.row.selectedPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="number" label="数量">
|
||||
<template #default="scope">
|
||||
<div v-if="disabled||props.status==0">
|
||||
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"
|
||||
size="small"></el-input-number>
|
||||
<el-dropdown>
|
||||
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu v-if="scope.row.trdnFlag == 1">
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.packagingUnit)">{{ scope.row.packagingUnit }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.minPackagingUnit)">
|
||||
{{ scope.row.minPackagingUnit }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>{{ scope.row.selectedNum }} {{ scope.row.selectedUnit }}</div>
|
||||
</div>
|
||||
</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="disabled||props.status==0">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" link @click="delGoods(scope.row)">X</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="bottom">
|
||||
<div class="search">
|
||||
<SearchInput
|
||||
:disabled="!disabled"
|
||||
:request-api="goodsSearchApi"
|
||||
:show-config="goodsShowConfig"
|
||||
:placeholder="'请输入药名或者拼音码'"
|
||||
@selectedCallBack="goodsSelect"></SearchInput>
|
||||
</div>
|
||||
<span>合计:¥{{ getTotalPrice() }}</span>
|
||||
</div>
|
||||
</panel>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import SearchInput from "@/components/SearchInput.vue";
|
||||
import {ref, watchEffect} from "vue";
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
const goodsDetail = defineModel<any>();
|
||||
const delGoods = (item: any) => {
|
||||
goodsDetail.value = goodsDetail.value.filter((i: any) => i.id != item.id)
|
||||
}
|
||||
|
||||
const goodsSearchApi = "goods/goods/search";
|
||||
const goodsShowConfig = [
|
||||
{
|
||||
label: "项目名称",
|
||||
prop: "name",
|
||||
},
|
||||
{
|
||||
label: "项目类型",
|
||||
prop: "type",
|
||||
},
|
||||
{
|
||||
label: "售价",
|
||||
prop: "unitPrice",
|
||||
},
|
||||
]
|
||||
const goodsSelect = (row: any) => {
|
||||
row.selectedNum = 1
|
||||
row.selectedUnit = row.packagingUnit
|
||||
row.selectedPrice = row.unitPrice
|
||||
goodsDetail.value.push(row)
|
||||
emit('totalPriceChange')
|
||||
}
|
||||
const selectUnit = (item: any, unit: any) => {
|
||||
item.selectedUnit = unit;
|
||||
if (unit == item.packagingUnit) {
|
||||
item.selectedPrice = item.unitPrice
|
||||
} else if (unit == item.minPackagingUnit) {
|
||||
item.selectedPrice = item.disassemblyPrice
|
||||
}
|
||||
emit('totalPriceChange')
|
||||
|
||||
}
|
||||
const emit = defineEmits(["totalPriceChange"])
|
||||
const handleNumChange = () => {
|
||||
emit('totalPriceChange')
|
||||
}
|
||||
const getTotalPrice = () => {
|
||||
let totalPrice = 0;
|
||||
if (goodsDetail.value) {
|
||||
goodsDetail.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;
|
||||
border-top: 1px solid #EAEAEC;
|
||||
display: flex;
|
||||
|
||||
.search {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -20,17 +20,21 @@
|
|||
¥{{ scope.row.selectedNum * scope.row.selectedPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="操作" v-if="disabled||props.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 :request-api="serviceSearchApi"
|
||||
:show-config="serviceShowConfig"
|
||||
:disabled="!disabled"
|
||||
@selectedCallBack="serviceSelect"></SearchInput>
|
||||
<div class="search">
|
||||
<SearchInput
|
||||
:placeholder="'请输入药服务项目或拼音码'"
|
||||
:request-api="serviceSearchApi"
|
||||
:show-config="serviceShowConfig"
|
||||
:disabled="!disabled"
|
||||
@selectedCallBack="serviceSelect"></SearchInput>
|
||||
</div>
|
||||
<span>合计:¥{{ getTotalPrice() || 0 }}</span>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
@ -106,5 +110,10 @@ watchEffect(() => {
|
|||
|
||||
.bottom {
|
||||
text-align: right;
|
||||
border-top: 1px solid #EAEAEC ;
|
||||
display: flex;
|
||||
.search{
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -50,9 +50,7 @@
|
|||
<ServiceDetail v-model="formData.itemDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||
</div>
|
||||
<div style="margin-top: 24px">
|
||||
<Panel title="药品耗材">
|
||||
<GoodsDetail v-model="formData" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||
</Panel>
|
||||
<GoodsDetail v-model="formData.goodsDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||
</div>
|
||||
<div class="bottom" >
|
||||
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
|
||||
|
|
@ -83,7 +81,7 @@ import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
|||
import {nextTick, onMounted, ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
||||
import GoodsDetail from "@/components/charge/GoodsDetail.vue";
|
||||
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
|
||||
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
|
||||
import Settlement from "@/components/charge/Settlement.vue";
|
||||
import TotalPrice from "@/components/charge/TotalPrice.vue";
|
||||
|
|
@ -98,7 +96,7 @@ const socialCard = ref<any>({payInfo: {}})
|
|||
const formData = ref<any>({
|
||||
patientInfo: {},
|
||||
diagnosisMedicalRecord: {},
|
||||
goodsList: [],
|
||||
goodsDetail: [],
|
||||
itemDetail: [],
|
||||
})
|
||||
const statusDisabled = ref(0)
|
||||
|
|
@ -138,8 +136,8 @@ const diagnosisSelect = (list: any) => {
|
|||
const recordsConsumptionRef= ref<any>("")
|
||||
const patientCardRef = ref()
|
||||
const clickItem = async (item: any, status: any) => {
|
||||
formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code})
|
||||
statusDisabled.value = status
|
||||
formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code})
|
||||
getOrderTotalPrice()
|
||||
nextTick(() => {
|
||||
let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail)
|
||||
|
|
|
|||
|
|
@ -10,13 +10,10 @@
|
|||
<Case ref="caseRef" v-else v-model="formData" :status="status" :isShowFrom="isShowFrom" @focus="focus"></Case>
|
||||
</div>
|
||||
<div class="service-items">
|
||||
<!-- <ServiceItemsDetail v-if="patientRegistration.status==3" v-model="itemList"></ServiceItemsDetail>-->
|
||||
<ServiceDetail v-model="formData.itemDetail" :status="status" @focus="focus" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||
</div>
|
||||
<div class="pharmaceutical-consumables">
|
||||
<PharmaceuticalConsumablesDetail v-if="patientRegistration.status==3"
|
||||
v-model="goodsList" ></PharmaceuticalConsumablesDetail>
|
||||
<PharmaceuticalConsumables v-else v-model="goodsList" :status="status" @focus="focus"></PharmaceuticalConsumables>
|
||||
<GoodsDetail v-model="formData.goodsDetail" :status="status" @focus="focus" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<div class="bottom">
|
||||
|
|
@ -24,7 +21,6 @@
|
|||
@edit="edit"></Settlement>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="top">
|
||||
|
|
@ -54,6 +50,7 @@ import CaseDetail from "@/components/outpatient/CaseDetail.vue";
|
|||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||
import PatientCard from "@/components/charge/PatientCard.vue";
|
||||
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
||||
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
|
||||
|
||||
const registerId = ref()
|
||||
const patientId = ref()
|
||||
|
|
@ -126,8 +123,8 @@ const getId = (item: any) => {
|
|||
regisId: item.id
|
||||
}).then((res: any) => {
|
||||
formData.value = res.diagnosisMedicalRecord
|
||||
goodsList.value = res.goodsDetail
|
||||
itemDetail.value = res.itemDetail
|
||||
formData.value.goodsDetail = res.goodsDetail
|
||||
formData.value.itemDetail = res.itemDetail
|
||||
patientRegistration.value = res.patientRegistration
|
||||
})
|
||||
|
||||
|
|
@ -146,10 +143,8 @@ const deleteItem = () => {
|
|||
}
|
||||
const getStatus = (e: any) => {
|
||||
status.value = e
|
||||
|
||||
formData.value.itemDetail = []
|
||||
// goodsList.value = []
|
||||
// itemDetail.value = []
|
||||
formData.value.goodsDetail = []
|
||||
patientRegistration.value = {}
|
||||
nextTick(() => {
|
||||
medicalHistoryRef.value?.clearList();
|
||||
|
|
@ -192,7 +187,6 @@ const copyForm=(item:any) => {
|
|||
})
|
||||
}
|
||||
const copyItemList=(item:any) => {
|
||||
console.log(item)
|
||||
itemDetail.value = item.itemDetail
|
||||
}
|
||||
const copyGoodsList=(item:any) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue