dev
This commit is contained in:
parent
313f1fb577
commit
358bb39ffb
|
|
@ -1,15 +1,17 @@
|
||||||
<template xmlns="http://www.w3.org/1999/html">
|
<template xmlns="http://www.w3.org/1999/html">
|
||||||
<Mask :width="1100" :height="600" :is-show="show" title="过期商品详情" @close="show=false">
|
<Mask :width="1100" :height="600" :is-show="show" title="过期商品详情" @close="close" :show-footer="true">
|
||||||
<el-table :data="tableData" style="width: 100%" class="table" max-height="1000px">
|
<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="名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="剩余天数">
|
<el-table-column label="剩余天数" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span :class="[scope.row.remaining_days <0?'danger':'warn']">
|
<span :class="[scope.row.remaining_days <0?'danger':'warn']">
|
||||||
{{scope.row.remaining_days <0?'已过期':scope.row.remaining_days+"天后到期"}}
|
{{scope.row.remaining_days <0?'已过期':scope.row.remaining_days+"天后到期"}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品数量" prop="">
|
<el-table-column label="商品数量" prop="" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.whole_number
|
scope.row.whole_number
|
||||||
|
|
@ -18,35 +20,57 @@
|
||||||
{{ scope.row.fragment_number }}{{ scope.row.min_packaging_unit }}
|
{{ scope.row.fragment_number }}{{ scope.row.min_packaging_unit }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="过期时间" prop="expiry_date"></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="inventory_purchase_code" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="批次号" prop="production_batch_code"></el-table-column>
|
<el-table-column label="批次号" prop="production_batch_code" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="生产日期" prop="production_date"></el-table-column>
|
<el-table-column label="生产日期" prop="production_date" show-overflow-tooltip></el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</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>
|
</Mask>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
import {ref} from "vue";
|
import {ref} from "vue";
|
||||||
import CloseBtn from "@/components/CloseBtn.vue";
|
import CloseBtn from "@/components/CloseBtn.vue";
|
||||||
|
import {post} from "@/utils/request.ts";
|
||||||
const tableData = ref<any>([]);
|
const tableData = ref<any>([]);
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const init = (list:any) => {
|
const init = () => {
|
||||||
tableData.value = list;
|
|
||||||
show.value = true;
|
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})
|
defineExpose({init})
|
||||||
const close = () => {
|
const close = () => {
|
||||||
show.value = false;
|
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>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.table{
|
.table{
|
||||||
margin-top: 30px;
|
|
||||||
.danger{
|
.danger{
|
||||||
color: #FF282E;
|
color: #FF282E;
|
||||||
}
|
}
|
||||||
|
|
@ -54,4 +78,11 @@ const close = () => {
|
||||||
color: #F69C51;
|
color: #F69C51;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.footer {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 24px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<Mask :width="1100" :height="600" :is-show="show" title="库存预警详情" @close="close">
|
<Mask :width="1100" :height="600" :is-show="show" title="库存预警详情" @close="close" :show-footer="true">
|
||||||
<el-table :data="tableData" style="width: 100%" class="table" max-height="1000px">
|
<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="名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="剩余库存">
|
<el-table-column label="剩余库存">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -16,7 +18,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存预警线">
|
<el-table-column label="库存预警线">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
小于等于{{scope.row.inventoryWarnNumber}}{{scope.row.packagingUnit}}
|
小于等于{{ scope.row.inventoryWarnNumber }}{{ scope.row.packagingUnit }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
|
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
|
||||||
|
|
@ -24,38 +26,70 @@
|
||||||
<el-table-column label="商品备注" prop="remark" show-overflow-tooltip></el-table-column>
|
<el-table-column label="商品备注" prop="remark" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="是否允许拆零">
|
<el-table-column label="是否允许拆零">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{scope.row.trdnFlag?"允许":"不允许"}}
|
{{ scope.row.trdnFlag ? "允许" : "不允许" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</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>
|
</Mask>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
import {ref} from "vue";
|
import {ref} from "vue";
|
||||||
import CloseBtn from "@/components/CloseBtn.vue";
|
import CloseBtn from "@/components/CloseBtn.vue";
|
||||||
|
import {post} from "@/utils/request.ts";
|
||||||
|
|
||||||
const tableData = ref<any>([]);
|
const tableData = ref<any>([]);
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const init = (list:any) => {
|
const init = () => {
|
||||||
|
|
||||||
tableData.value = list;
|
|
||||||
show.value = true;
|
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})
|
defineExpose({init})
|
||||||
const close = () => {
|
const close = () => {
|
||||||
show.value = false;
|
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>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.table{
|
.table {
|
||||||
margin-top: 30px;
|
.danger {
|
||||||
.danger{
|
|
||||||
color: #FF282E;
|
color: #FF282E;
|
||||||
}
|
}
|
||||||
.warn{
|
|
||||||
|
.warn {
|
||||||
color: #F69C51;
|
color: #F69C51;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 24px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -8,19 +8,16 @@ onMounted(() => {
|
||||||
getInventoryWarning()
|
getInventoryWarning()
|
||||||
})
|
})
|
||||||
const inventoryWarnDetailRef = ref()
|
const inventoryWarnDetailRef = ref()
|
||||||
const inventoryWarnListSrc = ref<any>([]);
|
|
||||||
const inventoryWarnList = ref<any>([]);
|
const inventoryWarnList = ref<any>([]);
|
||||||
const openInventoryWarnDetail = () => {
|
const openInventoryWarnDetail = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
inventoryWarnDetailRef.value.init(inventoryWarnListSrc.value)
|
inventoryWarnDetailRef.value.init()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getInventoryWarning = () => {
|
const getInventoryWarning = () => {
|
||||||
post("statistics/numberEarlyWarning").then((res: any) => {
|
post("statistics/numberEarlyWarning",{pageNum: 1, pageSize: 20}).then((res: any) => {
|
||||||
inventoryWarnListSrc.value = res
|
inventoryWarnList.value = res.list.slice(0, 4)
|
||||||
inventoryWarnList.value = res.slice(0, 4)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const isZeroInventory = (item: any) => {
|
const isZeroInventory = (item: any) => {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import ExpireWarnDetail from "@/components/home/index/Dialog/ExpireWarnDetail.vu
|
||||||
const expireWarnDetailRef = ref()
|
const expireWarnDetailRef = ref()
|
||||||
const openExpireWarnDetail = () => {
|
const openExpireWarnDetail = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
expireWarnDetailRef.value.init(expireDateWarningListSrc.value)
|
expireWarnDetailRef.value.init()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -18,9 +18,8 @@ const expireDateWarningListSrc = ref<any>([]);
|
||||||
const expireDateWarningList = ref<any>([]);
|
const expireDateWarningList = ref<any>([]);
|
||||||
|
|
||||||
const getExpiryDateWarning = () => {
|
const getExpiryDateWarning = () => {
|
||||||
post("statistics/expiryDateWarning").then((res: any) => {
|
post("statistics/expiryDateWarning",{pageNum: 1, pageSize: 20}).then((res: any) => {
|
||||||
expireDateWarningListSrc.value = res
|
expireDateWarningList.value = res.list.slice(0, 4)
|
||||||
expireDateWarningList.value = res.slice(0, 4)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const isExpire = (item: any) => {
|
const isExpire = (item: any) => {
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,6 @@ const init = () => {
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
post("item/getItemById", {id: props.id}).then((res: any) => {
|
post("item/getItemById", {id: props.id}).then((res: any) => {
|
||||||
form.value = res
|
form.value = res
|
||||||
form.value.unit = Number(res.unit)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,18 +96,18 @@
|
||||||
{{ scope.row.minPackagingNumber }}*{{ scope.row.minPackagingUnit }}/{{ scope.row.packagingUnit }}
|
{{ scope.row.minPackagingNumber }}*{{ scope.row.minPackagingUnit }}/{{ scope.row.packagingUnit }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed label="批准文号" width="200">
|
<el-table-column fixed label="批准文号" width="200" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.approvalCode }}
|
{{ scope.row.approvalCode }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed label="厂家" prop="producer" width="230" show-overflow-tooltip/>
|
<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">
|
<template #default="scope">
|
||||||
¥{{ scope.row.unitPrice.toFixed(2) }}
|
¥{{ scope.row.unitPrice.toFixed(2) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="类型" width="200">
|
<el-table-column label="类型" width="200" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ getTypeName(scope.row.type) }}<span v-if="scope.row.cateName">/{{ scope.row.cateName }}</span>
|
{{ getTypeName(scope.row.type) }}<span v-if="scope.row.cateName">/{{ scope.row.cateName }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
<el-tag type="danger" v-else>已停售</el-tag>
|
<el-tag type="danger" v-else>已停售</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数量" width="150">
|
<el-table-column label="库存数量" width="150" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
|
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
|
||||||
<template v-if="scope.row.inventoryFragmentNumber > 0">
|
<template v-if="scope.row.inventoryFragmentNumber > 0">
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可售库存" width="150">
|
<el-table-column label="可售库存" width="150" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
|
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
|
||||||
<template v-if="scope.row.inventoryFragmentNumber > 0">
|
<template v-if="scope.row.inventoryFragmentNumber > 0">
|
||||||
|
|
@ -134,8 +134,8 @@
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="150"></el-table-column>
|
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="150" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="进价" width="120">
|
<el-table-column label="进价" width="120" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
¥{{ scope.row.purchaseUnitPrice.toFixed(2) }}
|
¥{{ scope.row.purchaseUnitPrice.toFixed(2) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -147,24 +147,24 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="医保限价" prop="hilistPricUplmtAmt" show-overflow-tooltip></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="hilistLmtpricType" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="自付比例" prop="selfpayProp"></el-table-column>
|
<el-table-column label="自付比例" prop="selfpayProp" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="毛利率" width="120">
|
<el-table-column label="毛利率" width="120" show-overflow-tooltip>
|
||||||
<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">
|
<el-table-column label="利润分类" width="100" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ getProfitCategory(scope.row.interestRate) }}
|
{{ getProfitCategory(scope.row.interestRate) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template #default="scope">
|
||||||
¥{{ scope.row.costPrice.toFixed(2) }}
|
¥{{ scope.row.costPrice.toFixed(2) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="医保码" prop="hilistCode" width="240" show-overflow-tooltip></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">
|
<template #default="scope">
|
||||||
<el-tag class="tags" type="success" v-for="item in getTagsArray(scope.row.tags)">{{ item }}</el-tag>
|
<el-tag class="tags" type="success" v-for="item in getTagsArray(scope.row.tags)">{{ item }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content" ref="content">
|
<div class="content" ref="content">
|
||||||
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">
|
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue