This commit is contained in:
LiJianZhao 2025-05-14 10:27:28 +08:00
parent 11b5197c29
commit 8f4576f503
1 changed files with 50 additions and 31 deletions

View File

@ -7,8 +7,9 @@
<el-form-item>
<el-input placeholder="请输入名称"
clearable
v-model="searchModel.name"
v-model="searchModel.keyword"
style="width: 200px"
@input="searchGoods"
>
<template #prefix>
<el-icon class="el-input__icon">
@ -124,23 +125,31 @@
{{ scope.row.purchaseUnitPrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="医保类别" width="80">
<el-table-column label="甲乙丙类" width="80">
<template #default="scope">
{{ scope.row.chrgitmLv }}
</template>
</el-table-column>
<el-table-column label="利润分类" width="100">
<template #default="scope">
{{ getProfitCategory(scope.row.interestRate) }}
</template>
</el-table-column>
<el-table-column label="医保限价" prop="hilistPricUplmtAmt" show-overflow-tooltip></el-table-column>
<el-table-column label="限制说明" prop="hilistLmtpricType"></el-table-column>
<el-table-column label="自付比例" prop="selfpayProp"></el-table-column>
<el-table-column label="毛利率" width="120">
<template #default="scope">
{{ (scope.row.interestRate * 100).toFixed(2) }}%
</template>
</el-table-column>
<el-table-column label="利润分类" width="100">
<template #default="scope">
{{ getProfitCategory(scope.row.interestRate) }}
</template>
</el-table-column>
<el-table-column label="药品成本" prop="costPrice" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.costPrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
<el-table-column label="标签" prop="producer" width="200">
@ -149,26 +158,24 @@
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="150"/>
<el-table-column label="药品成本" prop="costPrice" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.costPrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
<el-table-column label="医保类别">
<template #default="scope">
{{ getTypeName(scope.row.type) }}
</template>
</el-table-column>
<el-table-column label="医保限价" prop="hilistPricUplmtAmt" show-overflow-tooltip></el-table-column>
<el-table-column label="自付比例" prop="selfpayProp"></el-table-column>
<el-table-column label="限制说明" prop="hilistLmtpricType"></el-table-column>
</el-table>
</div>
<div class="bottom">
<div class="statistics">
<div class="">总成本:{{statisticsData.totalCost}}</div>
<div class="">总售价:{{statisticsData.totalPrice}}</div>
<div class="">医保药品:{{statisticsData.totalSocialCount}}</div>
<div v-for="item in statisticsData.chrgitmLvInfoList">
{{item.name}}:{{item.ratio}}({{item.count}})
</div>
</div>
<div class="page_btn_list">
<el-pagination
background
@ -206,7 +213,7 @@ import InventoryBatchDetail from "@/components/inventory/goods/InventoryBatchDet
import InventoryStatistics from "@/components/inventory/goods/InventoryStatistics.vue";
import CloseBtn from "@/components/CloseBtn.vue";
import {Plus, SemiSelect} from "@element-plus/icons-vue";
const statisticsData = ref<any>({})
const inventoryNumber = ref(false)
const status = ref(false)
const profitCategory = [
@ -243,7 +250,7 @@ const getTypeName = (type: number) => {
return typeList[typeStr as keyof typeof typeList] || "未知类型";
}
const searchModel = ref({
name: "",
keyword: "",
cateId: [],
minInterestRate: "",
maxInterestRate: "",
@ -255,7 +262,7 @@ const searchGoods = () => {
pageSize: 20,
pageNum: 1,
cateId: cateArray == null ? null : cateArray[1],
name: searchModel.value.name,
keyword: searchModel.value.keyword,
minInterestRate: parseFloat(searchModel.value.minInterestRate) || null, //
maxInterestRate: parseFloat(searchModel.value.maxInterestRate) || null, //
interestRateIntervalList: [] as { min: number; max: number }[], //
@ -304,6 +311,7 @@ let init = () => {
total.value = res.total_count
})
getAllCate()
getStatisticsData()
}
let open_edit = (type: number, id: number) => {
@ -397,7 +405,7 @@ const changeTab = (name: string) => {
const activeName = ref('first')
const resetSearch = () => {
searchModel.value = {
name: "",
keyword: "",
cateId: [],
minInterestRate: "",
maxInterestRate: "",
@ -405,6 +413,14 @@ const resetSearch = () => {
}
init()
}
/**
* 获取商品统计数据 总成本 总售价 甲乙丙类
*/
const getStatisticsData = () => {
post("statistics/goodsStatistics").then((res: any) => {
statisticsData.value = res
})
}
</script>
<style scoped lang="scss">
.v-enter-active,
@ -464,6 +480,9 @@ const resetSearch = () => {
display: flex;
justify-content: flex-end;
align-items: center;
.statistics{
display: flex;
}
}
}