Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
# Conflicts: # src/components/common/goods/GoodsDetail.vue
This commit is contained in:
commit
b4c33c8583
|
|
@ -1,43 +1,7 @@
|
||||||
<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="名称">
|
<el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
|
||||||
<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 }}
|
||||||
|
|
@ -46,7 +10,7 @@
|
||||||
<el-table-column prop="number" label="数量">
|
<el-table-column prop="number" label="数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="props.status">
|
<div v-if="props.status">
|
||||||
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"
|
<el-input-number v-model="scope.row.selectedNum" :min="0" @change="handleNumChange"
|
||||||
size="small"></el-input-number>
|
size="small"></el-input-number>
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
||||||
|
|
@ -153,17 +117,7 @@ const getTotalPrice = () => {
|
||||||
|
|
||||||
return totalPrice;
|
return totalPrice;
|
||||||
}
|
}
|
||||||
const disabled = ref<any>(false)
|
|
||||||
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
if (props.status == 2 || props.status == 0) {
|
|
||||||
disabled.value = true
|
|
||||||
} else {
|
|
||||||
disabled.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-table__cell) {
|
:deep(.el-table__cell) {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number v-if="props.status" v-model="scope.row.selectedNum" min="0"
|
<el-input-number v-if="props.status" v-model="scope.row.selectedNum" :min="0"
|
||||||
@change="handleNumChange" size="small"></el-input-number>
|
@change="handleNumChange" size="small"></el-input-number>
|
||||||
<span v-else>{{ scope.row.selectedNum }}</span>
|
<span v-else>{{ scope.row.selectedNum }}</span>
|
||||||
{{ scope.row.selectedUnit }}
|
{{ scope.row.selectedUnit }}
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@
|
||||||
</Panel>
|
</Panel>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<ServiceDetail v-model="formData.itemDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<GoodsDetail v-model="formData.goodsDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom" >
|
<div class="bottom" >
|
||||||
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
|
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
|
||||||
|
|
@ -174,11 +174,12 @@ onMounted(() => {
|
||||||
list()
|
list()
|
||||||
})
|
})
|
||||||
const getOrderTotalPrice = () => {
|
const getOrderTotalPrice = () => {
|
||||||
|
debugger
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue