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