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,31 +1,42 @@
<script setup lang="ts">
import {defineModel} from "vue"
<script setup lang="ts">import { defineModel } from "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>
<template>
<Panel title="系统通知" class="system-notification">
<template #tools>
<el-button type="primary" size="small">查看详情</el-button>
<!-- 可选按钮 -->
</template>
<div class="system-notification-content">
<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">
<span class="system-notification-item-top-title">{{item.title}}</span>
<span>{{item.content}}</span>
<span class="system-notification-item-top-title">{{ item.title }}</span>
<span>{{ item.content }}</span>
</div>
<div class="system-notification-item-bottom">{{item.time}}</div>
<div class="system-notification-item-bottom">{{ item.time }}</div>
</div>
</el-scrollbar>
</div>
</Panel>
</template>
<style scoped lang="scss">
.system-notification-content {
<style scoped lang="scss">.system-notification-content {
height: 100%;
width: 100%;
display: flex;

View File

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

View File

@ -1,39 +1,46 @@
<template>
<Mask :width="800" :height="600" :is-show="show" >
<div class="search_content_wrapper">
<div class="search_wrapper">
<span>项目名称:</span>
<el-input
class="input"
v-model="keyword"
placeholder="请输入药品名称或者编号"
@keydown.enter="searchSocialItem"
clearable/>
<button @click="searchSocialItem">搜索</button>
</div>
<div class="search_result">
<div class="result_table" style="width: 100%; height: 100%;overflow: hidden">
<el-table v-loading="isloading" :data="searchResult.list" style="width: 100%;height: 350px"
highlight-current-row
@row-click = "changeCurRow"
:row-class-name="tableRowClassName">
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/>
<el-table-column prop="code" fixed label="医疗目录编码" width="180" show-overflow-tooltip/>
<el-table-column prop="unit" label="计价单位" width="180" show-overflow-tooltip/>
</el-table>
<div class="page_btn_list">
<el-pagination background layout="prev, pager, next" :page-count="searchResult.totalPage"
v-model:current-page="searchResult.pageNum" @current-change="changePage"/>
</div>
<Mask :width="800" :height="600" :is-show="show" @close="close" title="药品" :show-footer="true">
<template #default>
<div class="search_content_wrapper">
<div class="search_wrapper">
<span>项目名称:</span>
<el-input
class="input"
v-model="keyword"
placeholder="请输入药品名称或者编号"
@keydown.enter="searchSocialItem"
clearable/>
<el-button type="primary" @click="searchSocialItem">搜索</el-button>
</div>
<el-scrollbar style="width: 100%;overflow: hidden">
<div class="search_result" style="width: 100%;padding: 0 24px">
<div class="result_table" style="">
<el-table v-loading="isloading" :data="searchResult.list"
style="width: 100%"
highlight-current-row
@row-click="changeCurRow"
:row-class-name="tableRowClassName">
<el-table-column prop="name" label="名称" fixed 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>
</div>
</div>
</el-scrollbar>
</div>
<div class="search_bottom">
<el-button type="primary" @click="confirm">确认</el-button>
<el-button type="primary" @click="close">关闭</el-button>
</template>
<template #footer>
<div class="bottom">
<div class="page_btn_list">
<el-pagination background layout="prev, pager, next" :page-count="searchResult.totalPage"
v-model:current-page="searchResult.pageNum" @current-change="changePage"/>
</div>
<div class="btn">
<el-button type="primary" @click="confirm">确认</el-button>
<el-button type="primary" @click="close">关闭</el-button>
</div>
</div>
</div>
</template>
</Mask>
</template>
<script setup lang="ts">
@ -72,7 +79,7 @@ const init = (_name: string) => {
keyword.value = _name;
show.value = true;
initSearchData()
if (keyword.value&&keyword.value!=""){
if (keyword.value && keyword.value != "") {
searchSocialItem()
}
@ -95,7 +102,7 @@ let isloading = ref(false);
let searchSocialItem = () => {
isloading.value = true;
post("social/directory/itemSearch", {
keyword: keyword.value,pageSize:20,pageNum:searchResult.value.pageNum
keyword: keyword.value, pageSize: 20, pageNum: searchResult.value.pageNum
}, {catch_error: true}).then((res: any) => {
searchResult.value.totalPage = res.total_page;
searchResult.value.list = res.list;
@ -124,6 +131,8 @@ const close = () => {
border-radius: 10px;
box-sizing: border-box;
padding: 10px;
display: flex;
flex-direction: column;
}
.search_wrapper {
@ -164,6 +173,19 @@ const close = () => {
.search_result {
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>

View File

@ -1,41 +1,47 @@
<template>
<Mask :width="800" :height="600" :is-show="show" @close="show=false" title="项目列表">
<div class="search_content_wrapper">
<div class="search_wrapper">
<span>药品名称:</span>
<el-input
class="input"
v-model="keyword"
placeholder="请输入药品名称或者编号"
@input="search_social"
clearable/>
<el-button type="primary" @click="add">添加项目</el-button>
</div>
<div class="content">
<el-table :data="tableList" @row-click="rowClick">
<el-table-column
prop="name"
label="项目名称">
</el-table-column>
<el-table-column
prop="purchaseUnitPrice"
label="总进货价">
</el-table-column>
<el-table-column
prop="unitPrice"
label="总售价">
</el-table-column>
</el-table>
<div>
<el-pagination
@current-change="handleCurrentChange"
:current-page="current_page"
:page-size="20"
:total="total">
</el-pagination>
<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_wrapper">
<span>药品名称:</span>
<el-input
class="input"
v-model="keyword"
placeholder="请输入药品名称或者编号"
@input="search_social"
clearable/>
<el-button type="primary" @click="add">添加项目</el-button>
</div>
<div class="content">
<el-table :data="tableList" @row-click="rowClick">
<el-table-column
prop="name"
label="项目名称">
</el-table-column>
<el-table-column
prop="purchaseUnitPrice"
label="总进货价">
</el-table-column>
<el-table-column
prop="unitPrice"
label="总售价">
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<template #footer>
<div class="bottom">
<el-pagination
background
layout="prev, pager, next"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-size="20"
:total="total">
</el-pagination>
</div>
</template>
</Mask>
<AddProject :add="true" ref="addProjectMaskRef" @close="init"></AddProject>
</template>
@ -107,7 +113,7 @@ const add = () => {
addProjectMaskRef.value?.initData();
})
}
const total=ref<any>(0)
const total = ref<any>(0)
const handleCurrentChange = (val: any) => {
current_page.value = val;
init();
@ -200,4 +206,11 @@ const handleCurrentChange = (val: any) => {
width: 100%;
height: 400px;
}
.bottom{
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 24px;
}
</style>

View File

@ -1,15 +1,19 @@
const dosageUnitList =
["g", "mg", "ug", "ng"
, "L", "ml", "ul", "nl",
"s", "u", "万u", "IU",
"万IU", "Bq", "kBq", "GBq",
"MBq", "LSU", "PNA单位", "片",
"粒", "丸", "喷", "适量",
"单位"]
const packagingUnit = [
, "L", "ml", "ul", "nl",
"s", "u", "万u", "IU",
"万IU", "Bq", "kBq", "GBq",
"MBq", "LSU", "PNA单位", "片",
"粒", "丸", "喷", "适量",
"单位"]
const packagingUnit = [
"片", "颗", "粒", "支", "只", "丸", "枚", "张", "贴", "条",
"根", "板", "块", "滴", "揿", "盒", "瓶", "杯", "袋",
"包", "桶", "罐", "盆", "箱", "件", "泡", "喷", "吸", "付",
"副", "对", "份", "锭", "膜", "管", "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;
padding: 0 24px;
color: #000000;
cursor: pointer;
.image {
width: 20px;

View File

@ -28,7 +28,7 @@
<el-table :data="tableData" @row-click="rowClick">
<el-table-column prop="itemSocialCode" label="医保码编码" width="200"
: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="purchaseUnitPrice" label="原价"></el-table-column>
<el-table-column prop="unitPrice" label="售价"></el-table-column>