dev
This commit is contained in:
parent
a1f4d16148
commit
4980225f2f
|
|
@ -20,5 +20,10 @@
|
|||
"name": "代理名称",
|
||||
"qrCode": "qrCode.png",
|
||||
"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;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
.close-icon {
|
||||
color: #6e6e6e;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,37 @@
|
|||
<script setup lang="ts">
|
||||
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>
|
||||
|
||||
<template>
|
||||
<Panel title="药房基本信息" class="info">
|
||||
<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">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="'仁德大药房连锁有限公司'"
|
||||
:content="userMessage.name"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<div class="app_info-title">仁德大药房连锁有限公司</div>
|
||||
<div class="app_info-title">{{ userMessage.name }}</div>
|
||||
</el-tooltip>
|
||||
<div>软件版本:V2.5.1</div>
|
||||
<div style="margin: 10px 0">授权到期:2024-12-31</div>
|
||||
<div>版本类型:专业版</div>
|
||||
<div>软件版本:{{ userMessage.version }}</div>
|
||||
<div style="margin: 10px 0">授权到期:{{ formatDate(decryptedText.expiryDate) }}</div>
|
||||
<div>版本类型: {{ decryptedText.rule == 1 ? "禁用医保" : decryptedText.rule == 2 ? "全部开放" : "暂无" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
|
|||
|
|
@ -1,89 +1,96 @@
|
|||
|
||||
|
||||
<template>
|
||||
<CloseBtn @click="close"></CloseBtn>
|
||||
<!-- <div class="close" @click="close"><el-icon><Close /></el-icon></div>-->
|
||||
<el-table
|
||||
:data="cateList"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
width="200">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.name" v-if="scope.row.isEdit"></el-input>
|
||||
<span v-else>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<div >
|
||||
<div v-if="scope.row.isAdd" style="display: flex;">
|
||||
<el-button type="primary" size="small" @click="saveDo" class="btn">确定</el-button>
|
||||
<el-button size="small" @click="cancelAdd" class="btn">取消</el-button>
|
||||
<Mask :width="400" :height="600" :top="100" :is-show="isShow" @close="isShow=false" :show-fotter="true" title="药品列表">
|
||||
<el-table
|
||||
:data="cateList"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
width="200">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.name" v-if="scope.row.isEdit"></el-input>
|
||||
<span v-else>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<div>
|
||||
<div v-if="scope.row.isAdd" style="display: flex;">
|
||||
<el-button type="primary" size="small" @click="saveDo" class="btn">确定</el-button>
|
||||
<el-button size="small" @click="cancelAdd" class="btn">取消</el-button>
|
||||
</div>
|
||||
<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><ArrowDownBold/></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>
|
||||
</div>
|
||||
</div>
|
||||
<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><ArrowDownBold /></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>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-divider/>
|
||||
<el-button type="primary" @click="add" id="add">添加</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="add" id="add">添加</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, onUnmounted, ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
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({
|
||||
type: {
|
||||
type: Number,
|
||||
},
|
||||
})
|
||||
|
||||
interface CateItem {
|
||||
id?: number;
|
||||
name: string;
|
||||
type: number|undefined;
|
||||
type: number | undefined;
|
||||
isEdit: boolean;
|
||||
isAdd: boolean;
|
||||
sort: number;
|
||||
}
|
||||
|
||||
const cateList = ref<CateItem[]>([]);
|
||||
const getCateList = () => {
|
||||
post("goods/cate/list",{type:props.type}).then((res:any)=>{
|
||||
cateList.value=res
|
||||
post("goods/cate/list", {type: props.type}).then((res: any) => {
|
||||
cateList.value = res
|
||||
})
|
||||
}
|
||||
onMounted(()=>{
|
||||
onMounted(() => {
|
||||
getCateList()
|
||||
document.addEventListener("click", handleClickOutside);
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener("click", handleClickOutside);
|
||||
})
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
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 => {
|
||||
item.isEdit = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
const emit = defineEmits(['close'])
|
||||
const emit = defineEmits(['close'])
|
||||
const close = () => {
|
||||
emit('close')
|
||||
isShow.value = false
|
||||
emit('close')
|
||||
}
|
||||
const getCountByCateId = (cateId:any)=>{
|
||||
let count =0;
|
||||
post("goods/goods/getByCateId",{cateId:cateId}).
|
||||
then((res:any)=>{
|
||||
count=res
|
||||
const isShow = ref<any>(false)
|
||||
const getCountByCateId = (cateId: any) => {
|
||||
let count = 0;
|
||||
post("goods/goods/getByCateId", {cateId: cateId}).then((res: any) => {
|
||||
count = res
|
||||
ElMessageBox.confirm(
|
||||
`有${count}个西药属于该二级分类,删除后将一同清空西药的分类。是否确定删除?`,
|
||||
'Warning',
|
||||
|
|
@ -98,26 +105,25 @@ const getCountByCateId = (cateId:any)=>{
|
|||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
const del = async (id:any) => {
|
||||
await post("goods/cate/del",{id})
|
||||
const del = async (id: any) => {
|
||||
await post("goods/cate/del", {id})
|
||||
getCateList()
|
||||
}
|
||||
const saveDo = async ()=>{
|
||||
cateList.value.forEach((item,index)=>{
|
||||
item.sort=index+1
|
||||
if(item.name === ''){
|
||||
const saveDo = async () => {
|
||||
cateList.value.forEach((item, index) => {
|
||||
item.sort = index + 1
|
||||
if (item.name === '') {
|
||||
removeItemByIndex(index)
|
||||
}
|
||||
|
||||
})
|
||||
await post("goods/cate/save",{cateList:cateList.value})
|
||||
await post("goods/cate/save", {cateList: cateList.value})
|
||||
getCateList()
|
||||
|
||||
|
||||
}
|
||||
const save = ()=>{
|
||||
const save = () => {
|
||||
saveDo()
|
||||
close()
|
||||
}
|
||||
|
|
@ -137,27 +143,27 @@ const add = () => {
|
|||
type: props.type,
|
||||
isEdit: true,
|
||||
isAdd: true,
|
||||
sort: cateList.value.length+1
|
||||
sort: cateList.value.length + 1
|
||||
}
|
||||
cateList.value.push(newCate)
|
||||
}
|
||||
//移动 -1上移 1下移
|
||||
const move = (direction:number,row :any)=>{
|
||||
const move = (direction: number, row: any) => {
|
||||
const index = cateList.value.findIndex(item => item.id === row.id);
|
||||
if(index === -1)return;
|
||||
if (index === -1) return;
|
||||
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]];
|
||||
console.log(cateList)
|
||||
|
||||
}
|
||||
const cancelAdd = ()=>{
|
||||
const cancelAdd = () => {
|
||||
cateList.value.pop()
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.close{
|
||||
.close {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
|
@ -165,8 +171,17 @@ const cancelAdd = ()=>{
|
|||
font-size: 24px;
|
||||
z-index: 1999;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,357 +1,358 @@
|
|||
<template>
|
||||
<div class="header">
|
||||
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0" plain>
|
||||
一键建档
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="common-layout">
|
||||
<el-container>
|
||||
<el-aside width="800px">
|
||||
<div class="body">
|
||||
<el-form ref="formRef"
|
||||
:model="edit_data"
|
||||
:rules="rules" style="width: 100%">
|
||||
<el-descriptions title="基础" border direction="vertical">
|
||||
<el-descriptions-item label="名称">
|
||||
<el-form-item label="" prop="name" class="form-item">
|
||||
<el-input v-model="edit_data.name"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="类型" style="display: flex">
|
||||
<el-form-item label="" prop="cateId" class="form-item">
|
||||
<el-select v-model="edit_data.cateId" placeholder="请选择" style="width: 70%">
|
||||
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
|
||||
<div class="header">
|
||||
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0"
|
||||
plain>
|
||||
一键建档
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="common-layout">
|
||||
<el-container>
|
||||
<el-aside width="800px">
|
||||
<div class="body">
|
||||
<el-form ref="formRef"
|
||||
:model="edit_data"
|
||||
:rules="rules" style="width: 100%">
|
||||
<el-descriptions title="基础" border direction="vertical">
|
||||
<el-descriptions-item label="名称">
|
||||
<el-form-item label="" prop="name" class="form-item">
|
||||
<el-input v-model="edit_data.name"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="类型" style="display: flex">
|
||||
<el-form-item label="" prop="cateId" class="form-item">
|
||||
<el-select v-model="edit_data.cateId" placeholder="请选择" style="width: 70%">
|
||||
<el-option
|
||||
v-for="item in cate_list"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button @click="showCateEdit(true)">
|
||||
<el-icon>
|
||||
<Setting/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="进口|国产" v-if="_type==1306">
|
||||
<el-select
|
||||
v-model="edit_data.extra.maintainCate"
|
||||
placeholder="进口|国产"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cate_list"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
v-for="item in imported"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button @click="showCateEdit(true)">
|
||||
<el-icon>
|
||||
<Setting/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="进口|国产" v-if="_type==1306">
|
||||
<el-select
|
||||
v-model="edit_data.extra.maintainCate"
|
||||
placeholder="进口|国产"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in imported"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="批准文号" v-if="_type==1301">
|
||||
<el-form-item lable="" prop="approvalCode" class="form-item">
|
||||
<el-input v-model="edit_data.approvalCode" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="进价参考">
|
||||
<el-form-item label="" prop="purchaseUnitPrice" class="form-item">
|
||||
<el-input v-model.number="edit_data.purchaseUnitPrice">
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="生产企业" v-if="_type!=1302">
|
||||
<el-form-item label="" prop="producer" class="form-item">
|
||||
<el-input v-model="edit_data.producer"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="注册证名称" v-if="_type==1306">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.extra.registrationCertificateName" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="条形码">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.barcode"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格" v-if="_type==1302||_type==1306||_type==0">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.medicineDosageNum" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最小制剂数量|单位" v-if="_type==1301">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-input ref="medicineDosageRef" v-model="edit_data.medicineDosageNum" class="input"
|
||||
style="width: 200px;">
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="批准文号" v-if="_type==1301">
|
||||
<el-form-item lable="" prop="approvalCode" class="form-item">
|
||||
<el-input v-model="edit_data.approvalCode" class="input">
|
||||
</el-input>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="Title"
|
||||
:width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="unit">{{ edit_data.medicineDosageUnit }}</div>
|
||||
</template>
|
||||
<UnitSelector :units="dosageUnitList" v-model="edit_data.medicineDosageUnit"></UnitSelector>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最小包装数量|单位">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number" class="input"
|
||||
style="width: 200px;">
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="进价参考">
|
||||
<el-form-item label="" prop="purchaseUnitPrice" class="form-item">
|
||||
<el-input v-model.number="edit_data.purchaseUnitPrice">
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="Title"
|
||||
:width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="unit">{{ edit_data.minPackagingUnit }}</div>
|
||||
</template>
|
||||
<UnitSelector :units="packagingUnit" v-model="edit_data.minPackagingUnit"></UnitSelector>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="生产企业" v-if="_type!=1302">
|
||||
<el-form-item label="" prop="producer" class="form-item">
|
||||
<el-input v-model="edit_data.producer"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="包装单位">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="Title"
|
||||
:width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="unit" style="width: 232px">{{ edit_data.packagingUnit }}</div>
|
||||
</template>
|
||||
<UnitSelector :units="packagingUnit" v-model="edit_data.packagingUnit"></UnitSelector>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-descriptions-item label="注册证名称" v-if="_type==1306">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.extra.registrationCertificateName" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item :label="_type==1301?'国药准字':'国械注准'" v-if="_type==1301 || _type==1306">-->
|
||||
<!-- <el-input v-model="edit_data.approvalCode"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="注册剂型" v-if="_type==1301">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.extra.regType" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="药品标识码">
|
||||
<el-form-item>
|
||||
<el-popover
|
||||
:visible="showPopover"
|
||||
placement="bottom"
|
||||
:width="200"
|
||||
id="code-pop"
|
||||
class="code-popo"
|
||||
>
|
||||
<div style="color: #6c6b6b;font-size: 12px">已关联({{ idCodeList ? idCodeList.length : 0 }})</div>
|
||||
<Divider/>
|
||||
<div class="item">
|
||||
<div v-for="(item,index) in idCodeList" :key="index">
|
||||
<div class="remove">
|
||||
<el-icon @click="removeIdCode(item)" id="code-remove">
|
||||
<Close/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<div style="width: 70%" class="text">
|
||||
{{ item }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<el-descriptions-item label="条形码">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.barcode"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格" v-if="_type==1302||_type==1306||_type==0">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.medicineDosageNum" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最小制剂数量|单位" v-if="_type==1301">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-input ref="medicineDosageRef" v-model="edit_data.medicineDosageNum" class="input"
|
||||
style="width: 200px;">
|
||||
</el-input>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="Title"
|
||||
:width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="unit">{{ edit_data.medicineDosageUnit }}</div>
|
||||
</template>
|
||||
<UnitSelector :units="dosageUnitList" v-model="edit_data.medicineDosageUnit"></UnitSelector>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最小包装数量|单位">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number" class="input"
|
||||
style="width: 200px;">
|
||||
</el-input>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="Title"
|
||||
:width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="unit">{{ edit_data.minPackagingUnit }}</div>
|
||||
</template>
|
||||
<UnitSelector :units="packagingUnit" v-model="edit_data.minPackagingUnit"></UnitSelector>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<template #reference>
|
||||
<el-input v-model="idCode" id="code-input" @keydown.enter="addIdCode"
|
||||
@click="clickIdCodeInput"></el-input>
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="标签">
|
||||
<el-form-item>
|
||||
<el-input-tag
|
||||
draggable
|
||||
v-model="edit_data.tags"
|
||||
class="input"
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="包装单位">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="Title"
|
||||
:width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<template #reference>
|
||||
<div class="unit" style="width: 232px">{{ edit_data.packagingUnit }}</div>
|
||||
</template>
|
||||
<UnitSelector :units="packagingUnit" v-model="edit_data.packagingUnit"></UnitSelector>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item :label="_type==1301?'国药准字':'国械注准'" v-if="_type==1301 || _type==1306">-->
|
||||
<!-- <el-input v-model="edit_data.approvalCode"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="注册剂型" v-if="_type==1301">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.extra.regType" class="input">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="药品标识码">
|
||||
<el-form-item>
|
||||
<el-popover
|
||||
:visible="showPopover"
|
||||
placement="bottom"
|
||||
:width="200"
|
||||
id="code-pop"
|
||||
class="code-popo"
|
||||
>
|
||||
<div style="color: #6c6b6b;font-size: 12px">已关联({{ idCodeList ? idCodeList.length : 0 }})</div>
|
||||
<Divider/>
|
||||
<div class="item">
|
||||
<div v-for="(item,index) in idCodeList" :key="index">
|
||||
<div class="remove">
|
||||
<el-icon @click="removeIdCode(item)" id="code-remove">
|
||||
<Close/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<div style="width: 70%" class="text">
|
||||
{{ item }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #reference>
|
||||
<el-input v-model="idCode" id="code-input" @keydown.enter="addIdCode"
|
||||
@click="clickIdCodeInput"></el-input>
|
||||
</template>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="标签">
|
||||
<el-form-item>
|
||||
<el-input-tag
|
||||
draggable
|
||||
v-model="edit_data.tags"
|
||||
class="input"
|
||||
>
|
||||
</el-input-tag>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.remark" class="input"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="扩展" border style="margin-top: 20px" direction="vertical">
|
||||
<el-descriptions-item label="养护分类">
|
||||
<el-select
|
||||
v-model="edit_data.extra.maintainCate"
|
||||
placeholder="选择养护分类"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
</el-input-tag>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-form-item>
|
||||
<el-input v-model="edit_data.remark" class="input"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="扩展" border style="margin-top: 20px" direction="vertical">
|
||||
<el-descriptions-item label="养护分类">
|
||||
<el-select
|
||||
v-model="edit_data.extra.maintainCate"
|
||||
placeholder="选择养护分类"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in maintainOptions"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="储存条件">
|
||||
<el-select
|
||||
v-model="edit_data.extra.storageConditions"
|
||||
placeholder="选择养护分类"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storageConditionsOptions"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="保质期">
|
||||
<el-input v-model="edit_data.expiryTime" type="number">
|
||||
<template #append>月</template>
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="柜号">
|
||||
<el-input v-model="edit_data.extra.cabinetNumber">
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用法用量" v-if="_type==1301">
|
||||
<el-input v-model="edit_data.extra.usage">
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处方药/OTC" v-if="_type==1301">
|
||||
<el-select
|
||||
v-model="edit_data.extra.drugCategory"
|
||||
placeholder="选择药品分类"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in drugCategoryOptions"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="精麻毒放" v-if="_type==1301">
|
||||
<el-input v-model="edit_data.extra.JMDF"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗菌药物" v-if="_type==1301">
|
||||
<el-input v-model="edit_data.extra.isAntibacterialAgents"></el-input>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="基药" v-if="_type==1301">
|
||||
<el-input v-model="edit_data.extra.baseMedicine"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医疗器械分类" v-if="_type==1306">
|
||||
<el-input v-model="edit_data.extra.instrumentCategroy"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上市许可持有人">
|
||||
<el-input v-model="edit_data.extra.authorizationMaster"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="批准文号有效期" v-if="_type==1306">
|
||||
<el-input v-model="edit_data.extra.approvalNumberExpirDate"></el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-aside width="350px" style="border-left: 1px #ddd solid">
|
||||
<el-form style="width: 100%;" label-width="100px">
|
||||
<el-descriptions title="定价" border direction="vertical" :column="2" style="margin-left: 5px">
|
||||
<el-descriptions-item label="定价模式" width="180">
|
||||
<el-select v-model="edit_data.pricingModel" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in maintainOptions"
|
||||
:key="item.label"
|
||||
v-for="item in pricingModelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="储存条件">
|
||||
<el-select
|
||||
v-model="edit_data.extra.storageConditions"
|
||||
placeholder="选择养护分类"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
<el-descriptions-item label="加成率" v-if="edit_data.pricingModel==1">
|
||||
<el-input v-model="edit_data.makeUp" type="number">
|
||||
<template #append>%</template>
|
||||
</el-input>
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="零售价格" v-if="edit_data.pricingModel==2">
|
||||
<el-input v-model="edit_data.unitPrice" type="number"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storageConditionsOptions"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="保质期">
|
||||
<el-input v-model="edit_data.expiryTime" type="number">
|
||||
<template #append>月</template>
|
||||
<template #prefix>¥</template>
|
||||
<template #append>/{{ edit_data.packagingUnit }}</template>
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="柜号">
|
||||
<el-input v-model="edit_data.extra.cabinetNumber">
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用法用量" v-if="_type==1301">
|
||||
<el-input v-model="edit_data.extra.usage">
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处方药/OTC" v-if="_type==1301">
|
||||
<el-select
|
||||
v-model="edit_data.extra.drugCategory"
|
||||
placeholder="选择药品分类"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in drugCategoryOptions"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="精麻毒放" v-if="_type==1301" >
|
||||
<el-input v-model="edit_data.extra.JMDF"></el-input >
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗菌药物" v-if="_type==1301" >
|
||||
<el-input v-model="edit_data.extra.isAntibacterialAgents"></el-input>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="基药" v-if="_type==1301" >
|
||||
<el-input v-model="edit_data.extra.baseMedicine"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医疗器械分类" v-if="_type==1306" >
|
||||
<el-input v-model="edit_data.extra.instrumentCategroy"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上市许可持有人" >
|
||||
<el-input v-model="edit_data.extra.authorizationMaster"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="批准文号有效期" v-if="_type==1306" >
|
||||
<el-input v-model="edit_data.extra.approvalNumberExpirDate"></el-input>
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<el-checkbox v-model="edit_data.trdnFlag" label="是否允许拆零" size="large"/>
|
||||
</template>
|
||||
<el-input v-model="edit_data.disassemblyPrice" type="number" :disabled="!edit_data.trdnFlag">
|
||||
<template #prefix>¥</template>
|
||||
<template #append>/{{ edit_data.minPackagingUnit }}</template>
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px">
|
||||
<el-descriptions-item label="医保对码">
|
||||
<SocialInfo v-model="edit_data.hilistCode" v-if="edit_data.hilistCode"
|
||||
@openSearch="openContrastCodeSearch"></SocialInfo>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-aside width="350px" style="border-left: 1px #ddd solid">
|
||||
<el-form style="width: 100%;" label-width="100px">
|
||||
<el-descriptions title="定价" border direction="vertical" :column="2" style="margin-left: 5px">
|
||||
<el-descriptions-item label="定价模式" width="180">
|
||||
<el-select v-model="edit_data.pricingModel" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in pricingModelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="加成率" v-if="edit_data.pricingModel==1">
|
||||
<el-input v-model="edit_data.makeUp" type="number">
|
||||
<template #append>%</template>
|
||||
</el-input>
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="零售价格" v-if="edit_data.pricingModel==2">
|
||||
<el-input v-model="edit_data.unitPrice" type="number"
|
||||
>
|
||||
<template #prefix>¥</template>
|
||||
<template #append>/{{ edit_data.packagingUnit }}</template>
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template #label>
|
||||
<el-checkbox v-model="edit_data.trdnFlag" label="是否允许拆零" size="large"/>
|
||||
</template>
|
||||
<el-input v-model="edit_data.disassemblyPrice" type="number" :disabled="!edit_data.trdnFlag">
|
||||
<template #prefix>¥</template>
|
||||
<template #append>/{{ edit_data.minPackagingUnit }}</template>
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px">
|
||||
<el-descriptions-item label="医保对码">
|
||||
<SocialInfo v-model="edit_data.hilistCode" v-if="edit_data.hilistCode" @openSearch="openContrastCodeSearch"></SocialInfo>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
</div>
|
||||
|
||||
</el-aside>
|
||||
</el-container>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
<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="exit" plain>关闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
<!-- 新增关闭按钮 -->
|
||||
<div class="footer">
|
||||
<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="exit" plain>关闭</el-button>
|
||||
</div>
|
||||
|
||||
<Search ref="createSearchRef" @confirm="createConfirm"/>
|
||||
<Search ref="contrastCodeSearch" @confirm="contrastCodeConfirm"/>
|
||||
<Mask :width="400" :height="600" :top="100" :is-show="show_cate">
|
||||
<Cate :type="_type" @close="cateCloseCallBack"/>
|
||||
</Mask>
|
||||
|
||||
<Cate :type="_type" @close="cateCloseCallBack"/>
|
||||
</template>
|
||||
<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 show_cate = ref(false)
|
||||
const isShow = ref<any>(false)
|
||||
const imported = [{
|
||||
label: '进口',
|
||||
}, {label: '国产'}]
|
||||
|
|
@ -458,6 +460,7 @@ const removeIdCode = (item: string) => {
|
|||
showPopover.value = idCodeList.value.length > 0;
|
||||
}
|
||||
const init = (type: number, id: number) => {
|
||||
isShow.value = true
|
||||
_type.value = type;
|
||||
if (id != null && id != 0) {
|
||||
post("goods/goods/get", {id: id}).then((res: any) => {
|
||||
|
|
@ -478,7 +481,7 @@ defineExpose({init});
|
|||
const createSearchRef = ref<InstanceType<typeof Search>>();
|
||||
const openCreateSearch = () => {
|
||||
nextTick(() => {
|
||||
createSearchRef.value?.init(_type.value,edit_data.value.name);
|
||||
createSearchRef.value?.init(_type.value, edit_data.value.name);
|
||||
});
|
||||
}
|
||||
const createConfirm = (data: any) => {
|
||||
|
|
@ -487,7 +490,7 @@ const createConfirm = (data: any) => {
|
|||
const contrastCodeSearch = ref()
|
||||
const openContrastCodeSearch = () => {
|
||||
nextTick(() => {
|
||||
contrastCodeSearch.value?.init(_type.value,edit_data.value.name);
|
||||
contrastCodeSearch.value?.init(_type.value, edit_data.value.name);
|
||||
});
|
||||
}
|
||||
const contrastCodeConfirm = (data: any) => {
|
||||
|
|
@ -525,6 +528,7 @@ const cateCloseCallBack = () => {
|
|||
}
|
||||
let exit = () => {
|
||||
document.addEventListener("click", handleClickOutside);
|
||||
isShow.value = false
|
||||
emit('close');
|
||||
}
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
|
|
@ -606,8 +610,6 @@ const drugCategoryOptions = [
|
|||
]
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.header {
|
||||
|
|
@ -626,6 +628,7 @@ const drugCategoryOptions = [
|
|||
|
||||
.common-layout {
|
||||
margin-top: 10px;
|
||||
padding: 0 24px 24px;
|
||||
}
|
||||
|
||||
.item {
|
||||
|
|
@ -661,14 +664,13 @@ const drugCategoryOptions = [
|
|||
}
|
||||
|
||||
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +1,64 @@
|
|||
<template>
|
||||
<Mask :width="800" :height="600" :is-show="show" :top="100">
|
||||
<div class="search_content_wrapper">
|
||||
<div class="search_wrapper">
|
||||
<span>药品名称:</span>
|
||||
<el-input
|
||||
class="input"
|
||||
v-model="keyword"
|
||||
placeholder="请输入药品名称或者编号"
|
||||
@keydown.enter="search_social"
|
||||
clearable />
|
||||
<button @click="search_social" >搜索</button>
|
||||
<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_wrapper">
|
||||
<span>药品名称:</span>
|
||||
<el-input
|
||||
class="input"
|
||||
v-model="keyword"
|
||||
placeholder="请输入药品名称或者编号"
|
||||
@keydown.enter="search_social"
|
||||
clearable/>
|
||||
<el-button @click="search_social">搜索</el-button>
|
||||
</div>
|
||||
<div class="search_result">
|
||||
<div class="result_table" style="width: 100%; height: 100%;overflow: hidden">
|
||||
<el-scrollbar>
|
||||
<el-table v-loading="isloading" :data="search_result.list" style="width: 100%"
|
||||
highlight-current-row @current-change="change_current_search_data_index"
|
||||
:row-class-name="tableRowClassName">
|
||||
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="json.approval_number" fixed label="国药准字" width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="producer" label="生产企业" width="180" show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.reg_specifications" label="注册规格" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_packaging_unit" label="包装单位" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_packaging_number" label="包装数量" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_preparation_unit" label="制剂单位" width="80"
|
||||
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>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search_result">
|
||||
|
||||
<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"
|
||||
highlight-current-row @current-change="change_current_search_data_index"
|
||||
:row-class-name="tableRowClassName">
|
||||
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="json.approval_number" fixed label="国药准字" width="180" show-overflow-tooltip/>
|
||||
<el-table-column prop="producer" label="生产企业" width="180" show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.reg_specifications" label="注册规格" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_packaging_unit" label="包装单位" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_packaging_number" label="包装数量" width="80"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column v-if="type==1301" prop="json.min_preparation_unit" label="制剂单位" width="80"
|
||||
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>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<div class="page_btn_list">
|
||||
<el-pagination background layout="prev, pager, next" :page-count="search_result.total_page"
|
||||
v-model:current-page="current_page" @current-change="change_page"/>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" @click="confirm">确认</el-button>
|
||||
<el-button type="primary" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="search_bottom">
|
||||
<el-button type="primary" @click="confirm">确认</el-button>
|
||||
<el-button type="primary" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref,defineProps} from "vue";
|
||||
import {onMounted, ref, defineProps} from "vue";
|
||||
import {post} from '@/utils/request.ts'
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
|
||||
let current_search_data: any = null;
|
||||
let keyword = ref('');
|
||||
let produce=ref("");
|
||||
let produce = ref("");
|
||||
let type = ref(0);
|
||||
let current_page=ref(1)
|
||||
let current_page = ref(1)
|
||||
const show = ref(false);
|
||||
|
||||
const emit = defineEmits(["confirm"])
|
||||
|
|
@ -67,32 +71,28 @@ let search_result = ref({
|
|||
|
||||
|
||||
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 'valid'
|
||||
return 'valid'
|
||||
}
|
||||
|
||||
let change_page=(page:number)=>{
|
||||
let change_page = (page: number) => {
|
||||
search_social()
|
||||
}
|
||||
onMounted(() => {
|
||||
})
|
||||
const change_current_search_data_index = (val: any) => {
|
||||
current_search_data = JSON.parse(JSON.stringify(val));
|
||||
// proos.changeData(current_search_data)
|
||||
}
|
||||
const init = (_type: number,_name:string) => {
|
||||
const init = (_type: number, _name: string) => {
|
||||
type.value = _type;
|
||||
keyword.value=_name;
|
||||
keyword.value = _name;
|
||||
show.value = true;
|
||||
init_search_data()
|
||||
search_social()
|
||||
};
|
||||
defineExpose({init});
|
||||
|
||||
function init_search_data() {
|
||||
isloading.value=false;
|
||||
isloading.value = false;
|
||||
current_search_data = null;
|
||||
// proos.changeData(null)
|
||||
search_result.value = {
|
||||
|
|
@ -119,24 +119,30 @@ let confirm = () => {
|
|||
minPackagingUnit: jsondata.min_preparation_unit,
|
||||
expiryTime: 10,
|
||||
approvalCode: jsondata.approval_number || jsondata.reg_number || '',
|
||||
medicineDosageUnit:jsondata.min_measure_unit,
|
||||
medicineDosageNum:jsondata.specification,
|
||||
medicineDosageUnit: jsondata.min_measure_unit,
|
||||
medicineDosageNum: jsondata.specification,
|
||||
extra: {
|
||||
regType: jsondata.reg_type,
|
||||
approvalNumber: jsondata.approval_number,
|
||||
category:jsondata.category
|
||||
category: jsondata.category
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
emit('confirm',data)
|
||||
emit('confirm', data)
|
||||
show.value = false;
|
||||
|
||||
}
|
||||
let isloading=ref(false);
|
||||
let isloading = ref(false);
|
||||
let search_social = () => {
|
||||
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) => {
|
||||
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) => {
|
||||
init_search_data()
|
||||
let list = res.list;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
|
@ -158,8 +164,8 @@ let search_social = () => {
|
|||
list: list,
|
||||
page: 1,
|
||||
}
|
||||
}).catch(()=>{
|
||||
isloading.value=false;
|
||||
}).catch(() => {
|
||||
isloading.value = false;
|
||||
})
|
||||
}
|
||||
const close = () => {
|
||||
|
|
@ -167,53 +173,62 @@ const close = () => {
|
|||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.search_bottom {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
.bottom {
|
||||
display: flex;
|
||||
padding: 0 24px;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.search_content_wrapper {
|
||||
height: 522px;
|
||||
background-color: #FFF;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.search_wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 0 24px;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
height: 60px;
|
||||
span{
|
||||
flex-direction: column;
|
||||
|
||||
.search_wrapper {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
height: 60px;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.input {
|
||||
display: block;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
button {
|
||||
width: 80px;
|
||||
line-height: 40px;
|
||||
color: #FFF;
|
||||
margin-left: 10px;
|
||||
height: 40px;
|
||||
background-color: #409EFF;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.input{
|
||||
display: block;
|
||||
.search_result {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
button {
|
||||
width: 80px;
|
||||
line-height: 40px;
|
||||
color: #FFF;
|
||||
margin-left: 10px;
|
||||
height: 40px;
|
||||
background-color: #409EFF;
|
||||
border: none;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
:deep(.invalid) {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ const close = () => {
|
|||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
margin-top: 24px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<PaymentDetails></PaymentDetails>
|
||||
</div>
|
||||
<div class="right">
|
||||
<Card></Card>
|
||||
<Card v-model="userMessage"></Card>
|
||||
<CustomerService v-model="proxyMessage"></CustomerService>
|
||||
<SystemMessage v-model="systemMessage"></SystemMessage>
|
||||
<Banner></Banner>
|
||||
|
|
@ -40,6 +40,7 @@ onMounted(() => {
|
|||
})
|
||||
const systemMessage = ref("")
|
||||
const proxyMessage = ref("")
|
||||
const userMessage = ref("")
|
||||
let appConfig: any = null;
|
||||
|
||||
async function getData() {
|
||||
|
|
@ -47,6 +48,7 @@ async function getData() {
|
|||
appConfig = await response.json();
|
||||
systemMessage.value = appConfig.systemMessage
|
||||
proxyMessage.value = appConfig.proxy
|
||||
userMessage.value = appConfig.user
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -161,9 +161,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="is_add" :height="900" @close="is_add = false" title="新增">
|
||||
<Edit ref="editRef" @close="is_add = false;init()"/>
|
||||
</Mask>
|
||||
<Edit ref="editRef" @close="is_add = false;init()"/>
|
||||
<Mask :is-show="open" :top="50" :height="600" @close="open = false" title="编辑">
|
||||
<el-tabs v-model="activeName" @tab-change="changeTab">
|
||||
<el-tab-pane label="商品信息" name="first">
|
||||
|
|
@ -289,7 +287,6 @@ let init = () => {
|
|||
}
|
||||
|
||||
let open_edit = (type: number, id: number) => {
|
||||
is_add.value = true
|
||||
nextTick(() => {
|
||||
editRef.value?.init(type, id);
|
||||
});
|
||||
|
|
@ -415,11 +412,13 @@ const resetSearch = () => {
|
|||
.search {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left{
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-right: 24px;
|
||||
|
||||
.el-form-item {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue