This commit is contained in:
ChenQiuYu 2025-04-28 12:46:52 +08:00
parent a1f4d16148
commit 4980225f2f
10 changed files with 564 additions and 510 deletions

View File

@ -20,5 +20,10 @@
"name": "代理名称", "name": "代理名称",
"qrCode": "qrCode.png", "qrCode": "qrCode.png",
"phone": "18888888888" "phone": "18888888888"
},
"user": {
"name": "智慧医疗诊所",
"avatar": "avatar.png",
"version": "1.0.0"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

View File

@ -105,6 +105,7 @@ const closeBtn = () => {
border-radius: 16px; border-radius: 16px;
line-height: 32px; line-height: 32px;
text-align: center; text-align: center;
cursor: pointer;
.close-icon { .close-icon {
color: #6e6e6e; color: #6e6e6e;

View File

@ -1,22 +1,37 @@
<script setup lang="ts"> <script setup lang="ts">
import Panel from "@/components/common/Panel.vue"; import Panel from "@/components/common/Panel.vue";
import {post} from "@/utils/request.ts";
import {onMounted, ref, defineModel} from "vue";
import {formatDate} from "@/utils/dateUtils.ts";
const decryptedText = ref<any>({})
const ciphertext = ref<any>('')
const init = async () => {
ciphertext.value = await post("common/auth/get");
decryptedText.value = await post("common/auth/check");
console.log(decryptedText.value)
}
onMounted(async () => {
await init()
})
const userMessage = defineModel<any>()
</script> </script>
<template> <template>
<Panel title="药房基本信息" class="info"> <Panel title="药房基本信息" class="info">
<div class="info-content"> <div class="info-content">
<img class="image" src="/static/images/home/app-head.png" alt="app"> <img class="image" src="/static/images/default_logo.png" alt="app">
<div class="app_info-content-text"> <div class="app_info-content-text">
<el-tooltip <el-tooltip
effect="dark" effect="dark"
:content="'仁德大药房连锁有限公司'" :content="userMessage.name"
placement="bottom-start" placement="bottom-start"
> >
<div class="app_info-title">仁德大药房连锁有限公司</div> <div class="app_info-title">{{ userMessage.name }}</div>
</el-tooltip> </el-tooltip>
<div>软件版本V2.5.1</div> <div>软件版本{{ userMessage.version }}</div>
<div style="margin: 10px 0">授权到期2024-12-31</div> <div style="margin: 10px 0">授权到期{{ formatDate(decryptedText.expiryDate) }}</div>
<div>版本类型专业版</div> <div>版本类型 {{ decryptedText.rule == 1 ? "禁用医保" : decryptedText.rule == 2 ? "全部开放" : "暂无" }}</div>
</div> </div>
</div> </div>
</Panel> </Panel>

View File

@ -1,8 +1,5 @@
<template> <template>
<CloseBtn @click="close"></CloseBtn> <Mask :width="400" :height="600" :top="100" :is-show="isShow" @close="isShow=false" :show-fotter="true" title="药品列表">
<!-- <div class="close" @click="close"><el-icon><Close /></el-icon></div>-->
<el-table <el-table
:data="cateList" :data="cateList"
style="width: 100%" style="width: 100%"
@ -32,20 +29,28 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-divider/> <template #footer>
<div class="bottom">
<el-button type="primary" @click="add" id="add">添加</el-button> <el-button type="primary" @click="add" id="add">添加</el-button>
<el-button type="primary" @click="save">保存</el-button> <el-button type="primary" @click="save">保存</el-button>
</div>
</template>
</Mask>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onMounted, onUnmounted, ref} from "vue"; import {onMounted, onUnmounted, ref} from "vue";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
import {ElMessageBox} from "element-plus"; import {ElMessageBox} from "element-plus";
import CloseBtn from "@/components/CloseBtn.vue"; import Mask from "@/components/common/Mask.vue";
import {ArrowUpBold, ArrowDownBold, Delete, Edit} from "@element-plus/icons-vue";
const props = defineProps({ const props = defineProps({
type: { type: {
type: Number, type: Number,
}, },
}) })
interface CateItem { interface CateItem {
id?: number; id?: number;
name: string; name: string;
@ -54,6 +59,7 @@ interface CateItem {
isAdd: boolean; isAdd: boolean;
sort: number; sort: number;
} }
const cateList = ref<CateItem[]>([]); const cateList = ref<CateItem[]>([]);
const getCateList = () => { const getCateList = () => {
post("goods/cate/list", {type: props.type}).then((res: any) => { post("goods/cate/list", {type: props.type}).then((res: any) => {
@ -77,12 +83,13 @@ const handleClickOutside = (event: MouseEvent) => {
}; };
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
const close = () => { const close = () => {
isShow.value = false
emit('close') emit('close')
} }
const isShow = ref<any>(false)
const getCountByCateId = (cateId: any) => { const getCountByCateId = (cateId: any) => {
let count = 0; let count = 0;
post("goods/goods/getByCateId",{cateId:cateId}). post("goods/goods/getByCateId", {cateId: cateId}).then((res: any) => {
then((res:any)=>{
count = res count = res
ElMessageBox.confirm( ElMessageBox.confirm(
`${count}个西药属于该二级分类,删除后将一同清空西药的分类。是否确定删除?`, `${count}个西药属于该二级分类,删除后将一同清空西药的分类。是否确定删除?`,
@ -98,7 +105,6 @@ const getCountByCateId = (cateId:any)=>{
}) })
} }
const del = async (id: any) => { const del = async (id: any) => {
await post("goods/cate/del", {id}) await post("goods/cate/del", {id})
@ -165,8 +171,17 @@ const cancelAdd = ()=>{
font-size: 24px; font-size: 24px;
z-index: 1999; z-index: 1999;
} }
.btn { .btn {
margin-left: 10px; margin-left: 10px;
cursor: pointer; cursor: pointer;
} }
.bottom {
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 24px;
}
</style> </style>

View File

@ -1,6 +1,8 @@
<template> <template>
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
<div class="header"> <div class="header">
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0" plain> <el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0"
plain>
一键建档 一键建档
</el-button> </el-button>
</div> </div>
@ -331,27 +333,26 @@
</el-descriptions> </el-descriptions>
<el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px"> <el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px">
<el-descriptions-item label="医保对码"> <el-descriptions-item label="医保对码">
<SocialInfo v-model="edit_data.hilistCode" v-if="edit_data.hilistCode" @openSearch="openContrastCodeSearch"></SocialInfo> <SocialInfo v-model="edit_data.hilistCode" v-if="edit_data.hilistCode"
@openSearch="openContrastCodeSearch"></SocialInfo>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form> </el-form>
</el-aside> </el-aside>
</el-container> </el-container>
</div> </div>
<template #footer>
<!-- 新增关闭按钮 -->
<div class="footer"> <div class="footer">
<el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button> <el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button>
<el-button @click="save" type="primary">保存</el-button> <el-button @click="save" type="primary">保存</el-button>
<el-button @click="exit" plain>关闭</el-button> <el-button @click="exit" plain>关闭</el-button>
</div> </div>
</template>
</Mask>
<!-- 新增关闭按钮 -->
<Search ref="createSearchRef" @confirm="createConfirm"/> <Search ref="createSearchRef" @confirm="createConfirm"/>
<Search ref="contrastCodeSearch" @confirm="contrastCodeConfirm"/> <Search ref="contrastCodeSearch" @confirm="contrastCodeConfirm"/>
<Mask :width="400" :height="600" :top="100" :is-show="show_cate">
<Cate :type="_type" @close="cateCloseCallBack"/> <Cate :type="_type" @close="cateCloseCallBack"/>
</Mask>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -370,6 +371,7 @@ import SocialInfo from "@/components/inventory/goods/SocialInfo.vue";
let _type = ref(0); let _type = ref(0);
let type = ref(0); let type = ref(0);
let show_cate = ref(false) let show_cate = ref(false)
const isShow = ref<any>(false)
const imported = [{ const imported = [{
label: '进口', label: '进口',
}, {label: '国产'}] }, {label: '国产'}]
@ -458,6 +460,7 @@ const removeIdCode = (item: string) => {
showPopover.value = idCodeList.value.length > 0; showPopover.value = idCodeList.value.length > 0;
} }
const init = (type: number, id: number) => { const init = (type: number, id: number) => {
isShow.value = true
_type.value = type; _type.value = type;
if (id != null && id != 0) { if (id != null && id != 0) {
post("goods/goods/get", {id: id}).then((res: any) => { post("goods/goods/get", {id: id}).then((res: any) => {
@ -525,6 +528,7 @@ const cateCloseCallBack = () => {
} }
let exit = () => { let exit = () => {
document.addEventListener("click", handleClickOutside); document.addEventListener("click", handleClickOutside);
isShow.value = false
emit('close'); emit('close');
} }
const handleClickOutside = (event: MouseEvent) => { const handleClickOutside = (event: MouseEvent) => {
@ -606,8 +610,6 @@ const drugCategoryOptions = [
] ]
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.header { .header {
@ -626,6 +628,7 @@ const drugCategoryOptions = [
.common-layout { .common-layout {
margin-top: 10px; margin-top: 10px;
padding: 0 24px 24px;
} }
.item { .item {
@ -661,14 +664,13 @@ const drugCategoryOptions = [
} }
.footer { .footer {
position: absolute; height: 100%;
right: 10px; display: flex;
bottom: 10px; justify-content: flex-end;
align-items: center;
padding: 0 24px;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<Mask :width="800" :height="600" :is-show="show" :top="100"> <Mask :width="800" :height="720" :is-show="show" :top="100" @close="show=false" title="药品" :show-footer="true">
<div class="search_content_wrapper"> <div class="search_content_wrapper">
<div class="search_wrapper"> <div class="search_wrapper">
<span>药品名称:</span> <span>药品名称:</span>
@ -9,12 +9,12 @@
placeholder="请输入药品名称或者编号" placeholder="请输入药品名称或者编号"
@keydown.enter="search_social" @keydown.enter="search_social"
clearable/> clearable/>
<button @click="search_social" >搜索</button> <el-button @click="search_social">搜索</el-button>
</div> </div>
<div class="search_result"> <div class="search_result">
<div class="result_table" style="width: 100%; height: 100%;overflow: hidden"> <div class="result_table" style="width: 100%; height: 100%;overflow: hidden">
<el-table v-loading="isloading" :data="search_result.list" style="width: 100%;height: 350px" <el-scrollbar>
<el-table v-loading="isloading" :data="search_result.list" style="width: 100%"
highlight-current-row @current-change="change_current_search_data_index" highlight-current-row @current-change="change_current_search_data_index"
: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 width="180" show-overflow-tooltip/>
@ -31,18 +31,22 @@
<el-table-column prop="code" label="医保编码" width="180" show-overflow-tooltip/> <el-table-column prop="code" label="医保编码" width="180" show-overflow-tooltip/>
<el-table-column prop="enddate" label="有效期至" width="180" show-overflow-tooltip/> <el-table-column prop="enddate" label="有效期至" width="180" show-overflow-tooltip/>
</el-table> </el-table>
</el-scrollbar>
</div>
</div>
</div>
<template #footer>
<div class="bottom">
<div class="page_btn_list"> <div class="page_btn_list">
<el-pagination background layout="prev, pager, next" :page-count="search_result.total_page" <el-pagination background layout="prev, pager, next" :page-count="search_result.total_page"
v-model:current-page="current_page" @current-change="change_page"/> v-model:current-page="current_page" @current-change="change_page"/>
</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">
@ -76,8 +80,6 @@ let tableRowClassName = (res: any) => {
let change_page = (page: number) => { let change_page = (page: number) => {
search_social() search_social()
} }
onMounted(() => {
})
const change_current_search_data_index = (val: any) => { const change_current_search_data_index = (val: any) => {
current_search_data = JSON.parse(JSON.stringify(val)); current_search_data = JSON.parse(JSON.stringify(val));
// proos.changeData(current_search_data) // proos.changeData(current_search_data)
@ -86,8 +88,6 @@ const init = (_type: number,_name:string) => {
type.value = _type; type.value = _type;
keyword.value = _name; keyword.value = _name;
show.value = true; show.value = true;
init_search_data()
search_social()
}; };
defineExpose({init}); defineExpose({init});
@ -136,7 +136,13 @@ let confirm = () => {
let isloading = ref(false); let isloading = ref(false);
let search_social = () => { let search_social = () => {
isloading.value = true; isloading.value = true;
post("social/directory/search", {keyword: keyword.value,produce:produce.value, page: current_page.value, size: 20, type: type.value}, {catch_error: true}).then((res: any) => { post("social/directory/search", {
keyword: keyword.value,
produce: produce.value,
page: current_page.value,
size: 20,
type: type.value
}, {catch_error: true}).then((res: any) => {
init_search_data() init_search_data()
let list = res.list; let list = res.list;
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
@ -167,22 +173,22 @@ const close = () => {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.search_bottom { .bottom {
display: block; display: flex;
margin-top: 10px; padding: 0 24px;
justify-content: space-between;
margin-top: 20px;
} }
.search_content_wrapper { .search_content_wrapper {
height: 522px;
background-color: #FFF; background-color: #FFF;
width: 100%; width: 100%;
height: 100%;
overflow: hidden;
margin: auto;
margin-top: 20px;
border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 0 24px;
} margin-top: 24px;
display: flex;
flex-direction: column;
.search_wrapper { .search_wrapper {
position: relative; position: relative;
@ -190,6 +196,7 @@ const close = () => {
display: flex; display: flex;
margin: 0 auto; margin: 0 auto;
height: 60px; height: 60px;
span { span {
position: relative; position: relative;
display: block; display: block;
@ -214,6 +221,14 @@ const close = () => {
border: none; border: none;
} }
} }
.search_result {
flex: 1;
min-height: 0;
}
}
:deep(.invalid) { :deep(.invalid) {
color: #409EFF; color: #409EFF;
} }

View File

@ -181,7 +181,7 @@ const close = () => {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
margin: auto; margin: auto;
margin-top: 20px; margin-top: 24px;
border-radius: 10px; border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;

View File

@ -15,7 +15,7 @@
<PaymentDetails></PaymentDetails> <PaymentDetails></PaymentDetails>
</div> </div>
<div class="right"> <div class="right">
<Card></Card> <Card v-model="userMessage"></Card>
<CustomerService v-model="proxyMessage"></CustomerService> <CustomerService v-model="proxyMessage"></CustomerService>
<SystemMessage v-model="systemMessage"></SystemMessage> <SystemMessage v-model="systemMessage"></SystemMessage>
<Banner></Banner> <Banner></Banner>
@ -40,6 +40,7 @@ onMounted(() => {
}) })
const systemMessage = ref("") const systemMessage = ref("")
const proxyMessage = ref("") const proxyMessage = ref("")
const userMessage = ref("")
let appConfig: any = null; let appConfig: any = null;
async function getData() { async function getData() {
@ -47,6 +48,7 @@ async function getData() {
appConfig = await response.json(); appConfig = await response.json();
systemMessage.value = appConfig.systemMessage systemMessage.value = appConfig.systemMessage
proxyMessage.value = appConfig.proxy proxyMessage.value = appConfig.proxy
userMessage.value = appConfig.user
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -161,9 +161,7 @@
</div> </div>
</div> </div>
</div> </div>
<Mask :is-show="is_add" :height="900" @close="is_add = false" title="新增">
<Edit ref="editRef" @close="is_add = false;init()"/> <Edit ref="editRef" @close="is_add = false;init()"/>
</Mask>
<Mask :is-show="open" :top="50" :height="600" @close="open = false" title="编辑"> <Mask :is-show="open" :top="50" :height="600" @close="open = false" title="编辑">
<el-tabs v-model="activeName" @tab-change="changeTab"> <el-tabs v-model="activeName" @tab-change="changeTab">
<el-tab-pane label="商品信息" name="first"> <el-tab-pane label="商品信息" name="first">
@ -289,7 +287,6 @@ let init = () => {
} }
let open_edit = (type: number, id: number) => { let open_edit = (type: number, id: number) => {
is_add.value = true
nextTick(() => { nextTick(() => {
editRef.value?.init(type, id); editRef.value?.init(type, id);
}); });
@ -415,11 +412,13 @@ const resetSearch = () => {
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left { .left {
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-right: 24px; margin-right: 24px;
.el-form-item { .el-form-item {
margin-right: 5px; margin-right: 5px;
} }