dev
This commit is contained in:
parent
a1f4d16148
commit
4980225f2f
|
|
@ -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 |
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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%"
|
||||||
|
|
@ -17,59 +14,68 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120">
|
width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div >
|
<div>
|
||||||
<div v-if="scope.row.isAdd" style="display: flex;">
|
<div v-if="scope.row.isAdd" style="display: flex;">
|
||||||
<el-button type="primary" size="small" @click="saveDo" class="btn">确定</el-button>
|
<el-button type="primary" size="small" @click="saveDo" class="btn">确定</el-button>
|
||||||
<el-button size="small" @click="cancelAdd" class="btn">取消</el-button>
|
<el-button size="small" @click="cancelAdd" class="btn">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<span @click="move(-1,scope.row)" class="btn" ><el-icon><ArrowUpBold /></el-icon></span>
|
<span @click="move(-1,scope.row)" class="btn"><el-icon><ArrowUpBold/></el-icon></span>
|
||||||
<span @click="move(1,scope.row)" class="btn"><el-icon><ArrowDownBold /></el-icon></span>
|
<span @click="move(1,scope.row)" class="btn"><el-icon><ArrowDownBold/></el-icon></span>
|
||||||
<span @click="scope.row.isEdit=true" class="btn" id="edit"><el-icon><Edit /></el-icon></span>
|
<span @click="scope.row.isEdit=true" class="btn" id="edit"><el-icon><Edit/></el-icon></span>
|
||||||
<span @click="getCountByCateId(scope.row.id)" class="btn"> <el-icon><Delete /></el-icon></span>
|
<span @click="getCountByCateId(scope.row.id)" class="btn"> <el-icon><Delete/></el-icon></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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;
|
||||||
type: number|undefined;
|
type: number | undefined;
|
||||||
isEdit: boolean;
|
isEdit: boolean;
|
||||||
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) => {
|
||||||
cateList.value=res
|
cateList.value = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(() => {
|
||||||
getCateList()
|
getCateList()
|
||||||
document.addEventListener("click", handleClickOutside);
|
document.addEventListener("click", handleClickOutside);
|
||||||
})
|
})
|
||||||
onUnmounted(()=>{
|
onUnmounted(() => {
|
||||||
document.removeEventListener("click", handleClickOutside);
|
document.removeEventListener("click", handleClickOutside);
|
||||||
})
|
})
|
||||||
const handleClickOutside = (event: MouseEvent) => {
|
const handleClickOutside = (event: MouseEvent) => {
|
||||||
const target = event.target as HTMLElement;
|
const target = event.target as HTMLElement;
|
||||||
if (!target.closest('.el-input')&&!target.closest('#edit')&&!target.closest('#add')) {
|
if (!target.closest('.el-input') && !target.closest('#edit') && !target.closest('#add')) {
|
||||||
cateList.value.forEach(item => {
|
cateList.value.forEach(item => {
|
||||||
item.isEdit = false;
|
item.isEdit = false;
|
||||||
});
|
});
|
||||||
|
|
@ -77,13 +83,14 @@ const handleClickOutside = (event: MouseEvent) => {
|
||||||
};
|
};
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close'])
|
||||||
const close = () => {
|
const close = () => {
|
||||||
|
isShow.value = false
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
const getCountByCateId = (cateId:any)=>{
|
const isShow = ref<any>(false)
|
||||||
let count =0;
|
const getCountByCateId = (cateId: any) => {
|
||||||
post("goods/goods/getByCateId",{cateId:cateId}).
|
let count = 0;
|
||||||
then((res:any)=>{
|
post("goods/goods/getByCateId", {cateId: cateId}).then((res: any) => {
|
||||||
count=res
|
count = res
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
`有${count}个西药属于该二级分类,删除后将一同清空西药的分类。是否确定删除?`,
|
`有${count}个西药属于该二级分类,删除后将一同清空西药的分类。是否确定删除?`,
|
||||||
'Warning',
|
'Warning',
|
||||||
|
|
@ -98,26 +105,25 @@ 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})
|
||||||
getCateList()
|
getCateList()
|
||||||
}
|
}
|
||||||
const saveDo = async ()=>{
|
const saveDo = async () => {
|
||||||
cateList.value.forEach((item,index)=>{
|
cateList.value.forEach((item, index) => {
|
||||||
item.sort=index+1
|
item.sort = index + 1
|
||||||
if(item.name === ''){
|
if (item.name === '') {
|
||||||
removeItemByIndex(index)
|
removeItemByIndex(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
await post("goods/cate/save",{cateList:cateList.value})
|
await post("goods/cate/save", {cateList: cateList.value})
|
||||||
getCateList()
|
getCateList()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const save = ()=>{
|
const save = () => {
|
||||||
saveDo()
|
saveDo()
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
|
|
@ -137,27 +143,27 @@ const add = () => {
|
||||||
type: props.type,
|
type: props.type,
|
||||||
isEdit: true,
|
isEdit: true,
|
||||||
isAdd: true,
|
isAdd: true,
|
||||||
sort: cateList.value.length+1
|
sort: cateList.value.length + 1
|
||||||
}
|
}
|
||||||
cateList.value.push(newCate)
|
cateList.value.push(newCate)
|
||||||
}
|
}
|
||||||
//移动 -1上移 1下移
|
//移动 -1上移 1下移
|
||||||
const move = (direction:number,row :any)=>{
|
const move = (direction: number, row: any) => {
|
||||||
const index = cateList.value.findIndex(item => item.id === row.id);
|
const index = cateList.value.findIndex(item => item.id === row.id);
|
||||||
if(index === -1)return;
|
if (index === -1) return;
|
||||||
const targetIndex = index + direction;
|
const targetIndex = index + direction;
|
||||||
if(targetIndex<0||targetIndex>=cateList.value.length)return;
|
if (targetIndex < 0 || targetIndex >= cateList.value.length) return;
|
||||||
// 交换元素位置
|
// 交换元素位置
|
||||||
[cateList.value[index], cateList.value[targetIndex]] = [cateList.value[targetIndex], cateList.value[index]];
|
[cateList.value[index], cateList.value[targetIndex]] = [cateList.value[targetIndex], cateList.value[index]];
|
||||||
console.log(cateList)
|
console.log(cateList)
|
||||||
|
|
||||||
}
|
}
|
||||||
const cancelAdd = ()=>{
|
const cancelAdd = () => {
|
||||||
cateList.value.pop()
|
cateList.value.pop()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.close{
|
.close {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -267,23 +269,23 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="精麻毒放" v-if="_type==1301" >
|
<el-descriptions-item label="精麻毒放" v-if="_type==1301">
|
||||||
<el-input v-model="edit_data.extra.JMDF"></el-input >
|
<el-input v-model="edit_data.extra.JMDF"></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="抗菌药物" v-if="_type==1301" >
|
<el-descriptions-item label="抗菌药物" v-if="_type==1301">
|
||||||
<el-input v-model="edit_data.extra.isAntibacterialAgents"></el-input>
|
<el-input v-model="edit_data.extra.isAntibacterialAgents"></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="基药" v-if="_type==1301" >
|
<el-descriptions-item label="基药" v-if="_type==1301">
|
||||||
<el-input v-model="edit_data.extra.baseMedicine"></el-input>
|
<el-input v-model="edit_data.extra.baseMedicine"></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="医疗器械分类" v-if="_type==1306" >
|
<el-descriptions-item label="医疗器械分类" v-if="_type==1306">
|
||||||
<el-input v-model="edit_data.extra.instrumentCategroy"></el-input>
|
<el-input v-model="edit_data.extra.instrumentCategroy"></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="上市许可持有人" >
|
<el-descriptions-item label="上市许可持有人">
|
||||||
<el-input v-model="edit_data.extra.authorizationMaster"></el-input>
|
<el-input v-model="edit_data.extra.authorizationMaster"></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="批准文号有效期" v-if="_type==1306" >
|
<el-descriptions-item label="批准文号有效期" v-if="_type==1306">
|
||||||
<el-input v-model="edit_data.extra.approvalNumberExpirDate"></el-input>
|
<el-input v-model="edit_data.extra.approvalNumberExpirDate"></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
@ -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) => {
|
||||||
|
|
@ -478,7 +481,7 @@ defineExpose({init});
|
||||||
const createSearchRef = ref<InstanceType<typeof Search>>();
|
const createSearchRef = ref<InstanceType<typeof Search>>();
|
||||||
const openCreateSearch = () => {
|
const openCreateSearch = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
createSearchRef.value?.init(_type.value,edit_data.value.name);
|
createSearchRef.value?.init(_type.value, edit_data.value.name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const createConfirm = (data: any) => {
|
const createConfirm = (data: any) => {
|
||||||
|
|
@ -487,7 +490,7 @@ const createConfirm = (data: any) => {
|
||||||
const contrastCodeSearch = ref()
|
const contrastCodeSearch = ref()
|
||||||
const openContrastCodeSearch = () => {
|
const openContrastCodeSearch = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
contrastCodeSearch.value?.init(_type.value,edit_data.value.name);
|
contrastCodeSearch.value?.init(_type.value, edit_data.value.name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const contrastCodeConfirm = (data: any) => {
|
const contrastCodeConfirm = (data: 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>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -8,13 +8,13 @@
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
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,30 +31,34 @@
|
||||||
<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">
|
||||||
import {onMounted, ref,defineProps} from "vue";
|
import {onMounted, ref, defineProps} from "vue";
|
||||||
import {post} from '@/utils/request.ts'
|
import {post} from '@/utils/request.ts'
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
|
|
||||||
let current_search_data: any = null;
|
let current_search_data: any = null;
|
||||||
let keyword = ref('');
|
let keyword = ref('');
|
||||||
let produce=ref("");
|
let produce = ref("");
|
||||||
let type = ref(0);
|
let type = ref(0);
|
||||||
let current_page=ref(1)
|
let current_page = ref(1)
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
const emit = defineEmits(["confirm"])
|
const emit = defineEmits(["confirm"])
|
||||||
|
|
@ -67,32 +71,28 @@ let search_result = ref({
|
||||||
|
|
||||||
|
|
||||||
let tableRowClassName = (res: any) => {
|
let tableRowClassName = (res: any) => {
|
||||||
if(current_search_data!=null && current_search_data.id==res.row.id){
|
if (current_search_data != null && current_search_data.id == res.row.id) {
|
||||||
return 'invalid';
|
return 'invalid';
|
||||||
}
|
}
|
||||||
return 'valid'
|
return 'valid'
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
}
|
}
|
||||||
const init = (_type: number,_name:string) => {
|
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});
|
||||||
|
|
||||||
function init_search_data() {
|
function init_search_data() {
|
||||||
isloading.value=false;
|
isloading.value = false;
|
||||||
current_search_data = null;
|
current_search_data = null;
|
||||||
// proos.changeData(null)
|
// proos.changeData(null)
|
||||||
search_result.value = {
|
search_result.value = {
|
||||||
|
|
@ -119,24 +119,30 @@ let confirm = () => {
|
||||||
minPackagingUnit: jsondata.min_preparation_unit,
|
minPackagingUnit: jsondata.min_preparation_unit,
|
||||||
expiryTime: 10,
|
expiryTime: 10,
|
||||||
approvalCode: jsondata.approval_number || jsondata.reg_number || '',
|
approvalCode: jsondata.approval_number || jsondata.reg_number || '',
|
||||||
medicineDosageUnit:jsondata.min_measure_unit,
|
medicineDosageUnit: jsondata.min_measure_unit,
|
||||||
medicineDosageNum:jsondata.specification,
|
medicineDosageNum: jsondata.specification,
|
||||||
extra: {
|
extra: {
|
||||||
regType: jsondata.reg_type,
|
regType: jsondata.reg_type,
|
||||||
approvalNumber: jsondata.approval_number,
|
approvalNumber: jsondata.approval_number,
|
||||||
category:jsondata.category
|
category: jsondata.category
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit('confirm',data)
|
emit('confirm', data)
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
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++) {
|
||||||
|
|
@ -158,8 +164,8 @@ let search_social = () => {
|
||||||
list: list,
|
list: list,
|
||||||
page: 1,
|
page: 1,
|
||||||
}
|
}
|
||||||
}).catch(()=>{
|
}).catch(() => {
|
||||||
isloading.value=false;
|
isloading.value = false;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
|
|
@ -167,30 +173,31 @@ 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;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
span{
|
|
||||||
|
span {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|
@ -198,7 +205,7 @@ const close = () => {
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input{
|
.input {
|
||||||
display: block;
|
display: block;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
@ -213,7 +220,15 @@ const close = () => {
|
||||||
background-color: #409EFF;
|
background-color: #409EFF;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search_result {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
:deep(.invalid) {
|
:deep(.invalid) {
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue