This commit is contained in:
ChenQiuYu 2025-04-30 10:14:49 +08:00
parent 4b180c6da0
commit c4434929f6
7 changed files with 168 additions and 95 deletions

View File

@ -1,18 +1,30 @@
<script setup lang="ts">
import {defineModel} from "vue" <script setup lang="ts">import { defineModel } from "vue";
import Panel from "@/components/common/Panel.vue"; import Panel from "@/components/common/Panel.vue";
const systemMessage= defineModel()
console.log(systemMessage) //
interface SystemMessage {
title: string;
content: string;
time: string;
}
// 使 model
const systemMessage = defineModel<SystemMessage[]>({ default: () => [] });
</script> </script>
<template> <template>
<Panel title="系统通知" class="system-notification"> <Panel title="系统通知" class="system-notification">
<template #tools> <template #tools>
<el-button type="primary" size="small">查看详情</el-button> <!-- 可选按钮 -->
</template> </template>
<div class="system-notification-content"> <div class="system-notification-content">
<el-scrollbar> <el-scrollbar>
<div class="system-notification-item" v-for="(item,index) in systemMessage" :key="index"> <div
class="system-notification-item"
v-for="(item, index) in systemMessage"
:key="index"
>
<div class="system-notification-item-top"> <div class="system-notification-item-top">
<span class="system-notification-item-top-title">{{ item.title }}</span> <span class="system-notification-item-top-title">{{ item.title }}</span>
<span>{{ item.content }}</span> <span>{{ item.content }}</span>
@ -24,8 +36,7 @@ console.log(systemMessage)
</Panel> </Panel>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">.system-notification-content {
.system-notification-content {
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;

View File

@ -22,10 +22,17 @@
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="单位"> <el-descriptions-item label="单位">
<el-form-item prop="unit"> <el-form-item>
<el-input v-model.number="form.unit" min="0"> <el-popover
<template #append></template> placement="bottom"
</el-input> title="Title"
trigger="click"
>
<template #reference>
<el-input v-model="form.unit"></el-input>
</template>
<UnitSelector :units="itemUnitList" v-model="form.unit"></UnitSelector>
</el-popover>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="原价"> <el-descriptions-item label="原价">
@ -70,6 +77,8 @@ import {post} from "@/utils/request.ts";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import Mask from "@/components/common/Mask.vue"; import Mask from "@/components/common/Mask.vue";
import ItemSearch from "@/components/settings/ItemSearch.vue"; import ItemSearch from "@/components/settings/ItemSearch.vue";
import UnitSelector from "@/components/inventory/UnitSelector.vue";
import {itemUnitList} from "@/utils/unitList.ts"
const props = defineProps({ const props = defineProps({
id: { id: {
@ -183,4 +192,17 @@ defineExpose({init})
align-items: center; align-items: center;
padding: 0 24px; padding: 0 24px;
} }
.unit-item {
display: flex;
.unit {
width: 20px;
height: 32px;
border: 1px #ddd solid;
color: #818080;
display: flex;
justify-content: center;
}
}
</style> </style>

View File

@ -1,5 +1,6 @@
<template> <template>
<Mask :width="800" :height="600" :is-show="show" > <Mask :width="800" :height="600" :is-show="show" @close="close" title="药品" :show-footer="true">
<template #default>
<div class="search_content_wrapper"> <div class="search_content_wrapper">
<div class="search_wrapper"> <div class="search_wrapper">
<span>项目名称:</span> <span>项目名称:</span>
@ -9,31 +10,37 @@
placeholder="请输入药品名称或者编号" placeholder="请输入药品名称或者编号"
@keydown.enter="searchSocialItem" @keydown.enter="searchSocialItem"
clearable/> clearable/>
<button @click="searchSocialItem">搜索</button> <el-button type="primary" @click="searchSocialItem">搜索</el-button>
</div> </div>
<div class="search_result"> <el-scrollbar style="width: 100%;overflow: hidden">
<div class="search_result" style="width: 100%;padding: 0 24px">
<div class="result_table" style="width: 100%; height: 100%;overflow: hidden"> <div class="result_table" style="">
<el-table v-loading="isloading" :data="searchResult.list" style="width: 100%;height: 350px" <el-table v-loading="isloading" :data="searchResult.list"
style="width: 100%"
highlight-current-row highlight-current-row
@row-click="changeCurRow" @row-click="changeCurRow"
:row-class-name="tableRowClassName"> :row-class-name="tableRowClassName">
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/> <el-table-column prop="name" label="名称" fixed show-overflow-tooltip/>
<el-table-column prop="code" fixed label="医疗目录编码" width="180" show-overflow-tooltip/> <el-table-column prop="code" fixed label="医疗目录编码" show-overflow-tooltip/>
<el-table-column prop="unit" label="计价单位" width="180" show-overflow-tooltip/> <el-table-column prop="unit" label="计价单位" width="180" show-overflow-tooltip/>
</el-table> </el-table>
</div>
</div>
</el-scrollbar>
</div>
</template>
<template #footer>
<div class="bottom">
<div class="page_btn_list"> <div class="page_btn_list">
<el-pagination background layout="prev, pager, next" :page-count="searchResult.totalPage" <el-pagination background layout="prev, pager, next" :page-count="searchResult.totalPage"
v-model:current-page="searchResult.pageNum" @current-change="changePage"/> v-model:current-page="searchResult.pageNum" @current-change="changePage"/>
</div> </div>
</div> <div class="btn">
</div>
<div class="search_bottom">
<el-button type="primary" @click="confirm">确认</el-button> <el-button type="primary" @click="confirm">确认</el-button>
<el-button type="primary" @click="close">关闭</el-button> <el-button type="primary" @click="close">关闭</el-button>
</div> </div>
</div> </div>
</template>
</Mask> </Mask>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -124,6 +131,8 @@ const close = () => {
border-radius: 10px; border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
display: flex;
flex-direction: column;
} }
.search_wrapper { .search_wrapper {
@ -164,6 +173,19 @@ const close = () => {
.search_result { .search_result {
width: 100%; width: 100%;
height: 400px; flex: 1;
min-height: 0;
}
.bottom {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24px;
}
:deep(.el-input__wrapper) {
width: 100%;
} }
</style> </style>

View File

@ -1,5 +1,6 @@
<template> <template>
<Mask :width="800" :height="600" :is-show="show" @close="show=false" title="项目列表"> <Mask :width="800" :height="600" :is-show="show" @close="show=false" title="项目列表" :show-footer="true">
<template #default>
<div class="search_content_wrapper"> <div class="search_content_wrapper">
<div class="search_wrapper"> <div class="search_wrapper">
<span>药品名称:</span> <span>药品名称:</span>
@ -26,16 +27,21 @@
label="总售价"> label="总售价">
</el-table-column> </el-table-column>
</el-table> </el-table>
<div> </div>
</div>
</template>
<template #footer>
<div class="bottom">
<el-pagination <el-pagination
background
layout="prev, pager, next"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="current_page" :current-page="current_page"
:page-size="20" :page-size="20"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
</div> </template>
</div>
</Mask> </Mask>
<AddProject :add="true" ref="addProjectMaskRef" @close="init"></AddProject> <AddProject :add="true" ref="addProjectMaskRef" @close="init"></AddProject>
</template> </template>
@ -200,4 +206,11 @@ const handleCurrentChange = (val: any) => {
width: 100%; width: 100%;
height: 400px; height: 400px;
} }
.bottom{
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 24px;
}
</style> </style>

View File

@ -12,4 +12,8 @@ const packagingUnit = [
"包", "桶", "罐", "盆", "箱", "件", "泡", "喷", "吸", "付", "包", "桶", "罐", "盆", "箱", "件", "泡", "喷", "吸", "付",
"副", "对", "份", "锭", "膜", "管", "g", "mg", "ml", "IU", "副", "对", "份", "锭", "膜", "管", "g", "mg", "ml", "IU",
]; ];
export { dosageUnitList, packagingUnit} const itemUnitList = [
"次","项","针","根","颗","条","贴","副","袋","组","分钟","小时","穴位","部位",
"壮","牙","洞","根管"
]
export {dosageUnitList, packagingUnit, itemUnitList}

View File

@ -389,6 +389,7 @@ const openLevelEdit = (vip: any) => {
line-height: 50px; line-height: 50px;
padding: 0 24px; padding: 0 24px;
color: #000000; color: #000000;
cursor: pointer;
.image { .image {
width: 20px; width: 20px;

View File

@ -28,7 +28,7 @@
<el-table :data="tableData" @row-click="rowClick"> <el-table :data="tableData" @row-click="rowClick">
<el-table-column prop="itemSocialCode" label="医保码编码" width="200" <el-table-column prop="itemSocialCode" label="医保码编码" width="200"
:show-overflow-tooltip="true"></el-table-column> :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="itemName" label="项目名称"></el-table-column> <el-table-column prop="itemName" label="项目名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column> <el-table-column prop="unit" label="单位"></el-table-column>
<el-table-column prop="purchaseUnitPrice" label="原价"></el-table-column> <el-table-column prop="purchaseUnitPrice" label="原价"></el-table-column>
<el-table-column prop="unitPrice" label="售价"></el-table-column> <el-table-column prop="unitPrice" label="售价"></el-table-column>