This commit is contained in:
ChenQiuYu 2025-05-19 11:04:15 +08:00
parent 313f1fb577
commit 358bb39ffb
7 changed files with 141 additions and 82 deletions

View File

@ -1,52 +1,76 @@
<template xmlns="http://www.w3.org/1999/html">
<Mask :width="1100" :height="600" :is-show="show" title="过期商品详情" @close="show=false">
<el-table :data="tableData" style="width: 100%" class="table" max-height="1000px">
<el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="剩余天数">
<template #default="scope">
<Mask :width="1100" :height="600" :is-show="show" title="过期商品详情" @close="close" :show-footer="true">
<template #default>
<div style="height: 100%;padding: 24px">
<el-table :data="tableData" style="width: 100%" class="table">
<el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="剩余天数" show-overflow-tooltip>
<template #default="scope">
<span :class="[scope.row.remaining_days <0?'danger':'warn']">
{{scope.row.remaining_days <0?'已过期':scope.row.remaining_days+"天后到期"}}
</span>
</template>
</el-table-column>
<el-table-column label="商品数量" prop="">
<template #default="scope">
{{
scope.row.whole_number
}}{{ scope.row.packaging_unit }}
<span v-if="scope.row.fragment_number>0">
</template>
</el-table-column>
<el-table-column label="商品数量" prop="" show-overflow-tooltip>
<template #default="scope">
{{
scope.row.whole_number
}}{{ scope.row.packaging_unit }}
<span v-if="scope.row.fragment_number>0">
{{ scope.row.fragment_number }}{{ scope.row.min_packaging_unit }}
</span>
</template>
</el-table-column>
<el-table-column label="过期时间" prop="expiry_date"></el-table-column>
<el-table-column label="采购单号" prop="inventory_purchase_code"></el-table-column>
<el-table-column label="批次号" prop="production_batch_code"></el-table-column>
<el-table-column label="生产日期" prop="production_date"></el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="过期时间" prop="expiry_date"></el-table-column>
<el-table-column label="采购单号" prop="inventory_purchase_code" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="production_batch_code" show-overflow-tooltip></el-table-column>
<el-table-column label="生产日期" prop="production_date" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</template>
<template #footer>
<div class="footer">
<el-pagination
background
layout="prev, pager, next"
:page-count="pageNum"
:page-size="pageSize"
:total="total"
@current-change="changePage"
/>
</div>
</template>
</Mask>
</template>
<script setup lang="ts">
import Mask from "@/components/common/Mask.vue";
import {ref} from "vue";
import CloseBtn from "@/components/CloseBtn.vue";
import {post} from "@/utils/request.ts";
const tableData = ref<any>([]);
const show = ref(false);
const init = (list:any) => {
tableData.value = list;
const init = () => {
show.value = true;
post("statistics/expiryDateWarning",{pageNum: pageNum.value, pageSize: pageSize.value}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
};
defineExpose({init})
const close = () => {
show.value = false;
tableData.value = []
};
const pageNum = ref(1);
const pageSize = ref(20);
const total = ref(0);
const changePage = (pageNum: any) => {
pageNum.value = pageNum
init()
}
</script>
<style scoped lang="scss">
.table{
margin-top: 30px;
.danger{
color: #FF282E;
}
@ -54,4 +78,11 @@ const close = () => {
color: #F69C51;
}
}
.footer {
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 24px;
}
</style>

View File

@ -1,61 +1,95 @@
<template>
<Mask :width="1100" :height="600" :is-show="show" title="库存预警详情" @close="close">
<el-table :data="tableData" style="width: 100%" class="table" max-height="1000px">
<el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="剩余库存">
<template #default="scope">
<Mask :width="1100" :height="600" :is-show="show" title="库存预警详情" @close="close" :show-footer="true">
<template #default>
<div style="height: 100%;padding: 24px">
<el-table border :data="tableData" style="width: 100%;height: 100%" class="table">
<el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="剩余库存">
<template #default="scope">
<span :class="[scope.row.inventoryWholeNumber===0 && scope.row.inventoryFragmentNumber===0?'danger':'warn']">
{{
scope.row.inventoryWholeNumber
}}{{ scope.row.packagingUnit }}
scope.row.inventoryWholeNumber
}}{{ scope.row.packagingUnit }}
<span v-if="scope.row.inventoryFragmentNumber>0">
{{ scope.row.inventoryFragmentNumber }}{{ scope.row.minPackagingUnit }}
</span>
</span>
</template>
</el-table-column>
<el-table-column label="库存预警线">
<template #default="scope">
小于等于{{scope.row.inventoryWarnNumber}}{{scope.row.packagingUnit}}
</template>
</el-table-column>
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="producer" show-overflow-tooltip></el-table-column>
<el-table-column label="商品备注" prop="remark" show-overflow-tooltip></el-table-column>
<el-table-column label="是否允许拆零">
<template #default="scope">
{{scope.row.trdnFlag?"允许":"不允许"}}
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="库存预警线">
<template #default="scope">
小于等于{{ scope.row.inventoryWarnNumber }}{{ scope.row.packagingUnit }}
</template>
</el-table-column>
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="producer" show-overflow-tooltip></el-table-column>
<el-table-column label="商品备注" prop="remark" show-overflow-tooltip></el-table-column>
<el-table-column label="是否允许拆零">
<template #default="scope">
{{ scope.row.trdnFlag ? "允许" : "不允许" }}
</template>
</el-table-column>
</el-table>
</div>
</template>
<template #footer>
<div class="footer">
<el-pagination
background
layout="prev, pager, next"
:page-count="pageNum"
:page-size="pageSize"
:total="total"
@current-change="changePage"
/>
</div>
</template>
</Mask>
</template>
<script setup lang="ts">
import Mask from "@/components/common/Mask.vue";
import {ref} from "vue";
import CloseBtn from "@/components/CloseBtn.vue";
import {post} from "@/utils/request.ts";
const tableData = ref<any>([]);
const show = ref(false);
const init = (list:any) => {
tableData.value = list;
const init = () => {
show.value = true;
post("statistics/numberEarlyWarning", {pageNum: pageNum.value, pageSize: pageSize.value}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
};
defineExpose({init})
const close = () => {
show.value = false;
tableData.value = []
};
const pageNum = ref(1);
const pageSize = ref(20);
const total = ref(0);
const changePage = (pageNum: any) => {
pageNum.value = pageNum
init()
}
</script>
<style scoped lang="scss">
.table{
margin-top: 30px;
.danger{
.table {
.danger {
color: #FF282E;
}
.warn{
.warn {
color: #F69C51;
}
}
.footer {
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 24px;
}
</style>

View File

@ -8,19 +8,16 @@ onMounted(() => {
getInventoryWarning()
})
const inventoryWarnDetailRef = ref()
const inventoryWarnListSrc = ref<any>([]);
const inventoryWarnList = ref<any>([]);
const openInventoryWarnDetail = () => {
nextTick(() => {
inventoryWarnDetailRef.value.init(inventoryWarnListSrc.value)
inventoryWarnDetailRef.value.init()
})
}
const getInventoryWarning = () => {
post("statistics/numberEarlyWarning").then((res: any) => {
inventoryWarnListSrc.value = res
inventoryWarnList.value = res.slice(0, 4)
post("statistics/numberEarlyWarning",{pageNum: 1, pageSize: 20}).then((res: any) => {
inventoryWarnList.value = res.list.slice(0, 4)
})
}
const isZeroInventory = (item: any) => {

View File

@ -7,7 +7,7 @@ import ExpireWarnDetail from "@/components/home/index/Dialog/ExpireWarnDetail.vu
const expireWarnDetailRef = ref()
const openExpireWarnDetail = () => {
nextTick(() => {
expireWarnDetailRef.value.init(expireDateWarningListSrc.value)
expireWarnDetailRef.value.init()
})
}
@ -18,9 +18,8 @@ const expireDateWarningListSrc = ref<any>([]);
const expireDateWarningList = ref<any>([]);
const getExpiryDateWarning = () => {
post("statistics/expiryDateWarning").then((res: any) => {
expireDateWarningListSrc.value = res
expireDateWarningList.value = res.slice(0, 4)
post("statistics/expiryDateWarning",{pageNum: 1, pageSize: 20}).then((res: any) => {
expireDateWarningList.value = res.list.slice(0, 4)
})
}
const isExpire = (item: any) => {

View File

@ -177,7 +177,6 @@ const init = () => {
if (props.id) {
post("item/getItemById", {id: props.id}).then((res: any) => {
form.value = res
form.value.unit = Number(res.unit)
})
}
}

View File

@ -96,18 +96,18 @@
{{ scope.row.minPackagingNumber }}*{{ scope.row.minPackagingUnit }}/{{ scope.row.packagingUnit }}
</template>
</el-table-column>
<el-table-column fixed label="批准文号" width="200">
<el-table-column fixed label="批准文号" width="200" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.approvalCode }}
</template>
</el-table-column>
<el-table-column fixed label="厂家" prop="producer" width="230" show-overflow-tooltip/>
<el-table-column fixed label="售价" width="120">
<el-table-column fixed label="售价" width="120" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.unitPrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="类型" width="200">
<el-table-column label="类型" width="200" show-overflow-tooltip>
<template #default="scope">
{{ getTypeName(scope.row.type) }}<span v-if="scope.row.cateName">/{{ scope.row.cateName }}</span>
</template>
@ -118,7 +118,7 @@
<el-tag type="danger" v-else>已停售</el-tag>
</template>
</el-table-column>
<el-table-column label="库存数量" width="150">
<el-table-column label="库存数量" width="150" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
<template v-if="scope.row.inventoryFragmentNumber > 0">
@ -126,7 +126,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="可售库存" width="150">
<el-table-column label="可售库存" width="150" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
<template v-if="scope.row.inventoryFragmentNumber > 0">
@ -134,8 +134,8 @@
</template>
</template>
</el-table-column>
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="150"></el-table-column>
<el-table-column label="进价" width="120">
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="进价" width="120" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.purchaseUnitPrice.toFixed(2) }}
</template>
@ -147,24 +147,24 @@
</el-table-column>
<el-table-column label="医保限价" prop="hilistPricUplmtAmt" show-overflow-tooltip></el-table-column>
<el-table-column label="限制说明" prop="hilistLmtpricType" show-overflow-tooltip></el-table-column>
<el-table-column label="自付比例" prop="selfpayProp"></el-table-column>
<el-table-column label="毛利率" width="120">
<el-table-column label="自付比例" prop="selfpayProp" show-overflow-tooltip></el-table-column>
<el-table-column label="毛利率" width="120" show-overflow-tooltip>
<template #default="scope">
{{ (scope.row.interestRate * 100).toFixed(2) }}%
</template>
</el-table-column>
<el-table-column label="利润分类" width="100">
<el-table-column label="利润分类" width="100" show-overflow-tooltip>
<template #default="scope">
{{ getProfitCategory(scope.row.interestRate) }}
</template>
</el-table-column>
<el-table-column label="药品成本" prop="costPrice" width="150">
<el-table-column label="药品成本" prop="costPrice" width="150" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.costPrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="医保码" prop="hilistCode" width="240" show-overflow-tooltip></el-table-column>
<el-table-column label="标签" prop="producer" width="200">
<el-table-column label="标签" prop="producer" width="200" show-overflow-tooltip>
<template #default="scope">
<el-tag class="tags" type="success" v-for="item in getTagsArray(scope.row.tags)">{{ item }}</el-tag>
</template>

View File

@ -38,7 +38,6 @@
</template>
</el-dropdown>
</div>
</div>
<div class="content" ref="content">
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">