Merge remote-tracking branch 'origin/main'

This commit is contained in:
牛子源 2025-05-14 13:17:20 +08:00
commit 87c79ea0fc
17 changed files with 170 additions and 69 deletions

View File

@ -1,5 +1,5 @@
<template>
<Mask :top="50" :height="650" :width="900" :is-show="show" title="追溯码采集" @close="show = false" :show-footer="true">
<Mask :height="650" :width="900" :is-show="show" title="追溯码采集" @close="show = false" :show-footer="true">
<el-card>
<div class="detail">
<el-input placeholder="请输入追溯码" v-model="inputIdCode" clearable @keydown.enter="openAssociationIdCode()">

View File

@ -1,6 +1,6 @@
<template>
<div style="position: fixed; z-index: 99999;">
<Mask :top="50" :height="700" :width="900" :is-show="show">
<Mask :height="700" :width="900" :is-show="show">
<CloseBtn @click="show = false"></CloseBtn>
<el-card>
<template #header>

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="1200" :height="600" :top="100" :is-show="isShow" @close="exit" title="新增领用" :show-footer="true">
<Mask :width="1200" :height="600" :is-show="isShow" @close="exit" title="新增领用" :show-footer="true">
<div class="add-panel">
<div class="top">
<el-form :inline=true label-position="top" :model="formData" label-width="auto">

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="1200" :height="600" :top="100" :is-show="isShow" @close="exit" title="查看领用" :show-footer="true">
<Mask :width="1200" :height="600" :is-show="isShow" @close="exit" title="查看领用" :show-footer="true">
<div style="margin-top: 24px;padding: 0 24px">
<el-descriptions border label-width="100">
<el-descriptions-item label="领用人" width="200">

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="1200" :height="540" :is-show="isShow" :top="100" @close="exit" title="新增盘点" :show-footer="true">
<Mask :width="1200" :height="540" :is-show="isShow" @close="exit" title="新增盘点" :show-footer="true">
<div class="body_wrapper">
<div class="top" style="width: 100%">
<el-form :model="form" style="width: 100%" label-width="auto" class="demo-ruleForm" label-position="top">

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="1200" :height="540" :is-show="isShow" :top="100" @close="exit" title="查看盘点" :show-footer="true">
<Mask :width="1200" :height="540" :is-show="isShow" @close="exit" title="查看盘点" :show-footer="true">
<div class="body_wrapper">
<div class="top">
<el-form :model="form" style="width: 100%" label-width="auto" class="demo-ruleForm" label-position="top">

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="400" :height="600" :top="100" :is-show="isShow" @close="isShow=false" :show-fotter="true" title="药品列表">
<Mask :width="400" :height="600" :is-show="isShow" @close="isShow=false" :show-fotter="true" title="药品列表">
<el-table
:data="cateList"
style="width: 100%"

View File

@ -78,20 +78,6 @@
</el-input>
</el-form-item>
</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">
@ -280,10 +266,10 @@
<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="用法用量" 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"
@ -314,12 +300,51 @@
/>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="抗菌药物" v-if="_type==1301">
<el-input v-model="edit_data.extra.isAntibacterialAgents"></el-input>
<el-descriptions-item label="抗菌药物|DDD值" v-if="_type==1301">
<div class="antibacterial-agents">
<el-select
v-model="edit_data.extra.isAntibacterialAgents"
clearable
style="width: 100px"
>
<el-option
v-for="item in isAntibacterialAgentsOptions"
:key="item.label"
:label="item.label"
:value="item.label"
/>
</el-select>
<el-input v-model="edit_data.extra.DDD" style="width: 80px"/>
<div class="unit-item">
<el-popover
placement="bottom"
title="Title"
:width="200"
trigger="click"
>
<template #reference>
<div class="unit" style="width: 232px">{{ edit_data.extra.DDDUnit }}</div>
</template>
<UnitSelector :units="DDDUnitList" v-model="edit_data.extra.DDDUnit"></UnitSelector>
</el-popover>
</div>
</div>
</el-descriptions-item>
<el-descriptions-item label="基药" v-if="_type==1301">
<el-input v-model="edit_data.extra.baseMedicine"></el-input>
<el-select
v-model="edit_data.extra.baseMedicine"
placeholder="选择基药"
clearable
style="width: 240px"
>
<el-option
v-for="item in baseMedicineOptions"
:key="item.label"
:label="item.label"
:value="item.label"
/>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="医疗器械分类" v-if="_type==1306">
<el-input v-model="edit_data.extra.instrumentCategroy"></el-input>
@ -338,7 +363,13 @@
<el-aside width="350px" style="border-left: 1px #ddd solid">
<el-form style="width: 100%;" :rules="rules" ref="formRef" label-width="100px">
<el-descriptions title="定价" border direction="vertical" :column="2" style="margin-left: 5px">
<el-descriptions-item label="定价模式" width="180">
<el-descriptions-item label="进价参考" width="180">
<el-input v-model.number="edit_data.purchaseUnitPrice" type="number" :min="1">
<template #prefix></template>
</el-input>
</el-descriptions-item>
<el-descriptions-item label="定价模式" >
<el-select v-model="edit_data.pricingModel" placeholder="请选择">
<el-option
v-for="item in pricingModelOptions"
@ -348,7 +379,7 @@
</el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="加成率" v-if="edit_data.pricingModel==1">
<el-descriptions-item label="加成率" v-if="edit_data.pricingModel==1" width="180">
<el-input v-model="edit_data.makeUp" type="number">
<template #append>%</template>
</el-input>
@ -388,7 +419,8 @@
<el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button>
<el-button v-if="edit_data.saleStatus" type="danger" @click="disableSale">停售</el-button>
<el-button v-else type="danger" @click="enableSale">起售</el-button>
<el-button @click="save" type="primary">保存</el-button>
<el-button @click="save(true)" type="primary">保存</el-button>
<el-button @click="save(false)" type="primary" v-if="edit_data.id == null">保存并继续</el-button>
<el-button @click="exit" plain>关闭</el-button>
</div>
</template>
@ -401,7 +433,7 @@
<script setup lang="ts">
import {nextTick, ref, watch} from "vue";
import {dosageUnitList, packagingUnit} from "@/utils/unitList.ts"
import {dosageUnitList, packagingUnit,DDDUnitList} from "@/utils/unitList.ts"
import {Setting, Close} from "@element-plus/icons-vue";
import Mask from "@/components/common/Mask.vue";
import Search from "@/components/inventory/goods/Search.vue";
@ -429,6 +461,26 @@ const pricingModelOptions = [
value: 0,
}
]
const isAntibacterialAgentsOptions = [
{
label: '非限制使用级',
},
{
label: '限制使用级',
},
{
label: '特殊使用级',
}
]
const baseMedicineOptions = [
{
label: '国家基药',
},
{
label: '地标基药',
}
]
const JMDFList = [
{
label: '精I',
@ -494,7 +546,19 @@ let edit_data: any = ref({
packagingUnit: "盒",
pricingModel: 0,
expiryWarnDays: 0,
purchaseUnitPrice:1
});
const initEditData = () => {
edit_data.value = {
trdnFlag: false,
extra: {},
minPackagingUnit: "只",
packagingUnit: "盒",
pricingModel: 0,
expiryWarnDays: 0,
purchaseUnitPrice:1
}
}
const idCode = ref("");
const showPopover = ref(false);
const idCodeList = ref<string[]>([]);
@ -558,10 +622,15 @@ const openCreateSearch = () => {
});
}
const createConfirm = (data: any) => {
let id = edit_data.value.id
edit_data.value = data
edit_data.value.id = id
edit_data.value.name = data.name
edit_data.value.approvalCode = data.approvalCode
edit_data.value.producer = data.producer
edit_data.value.packagingUnit = data.packagingUnit
edit_data.value.minPackagingNumber = data.minPackagingNumber
edit_data.value.minPackagingUnit = data.minPackagingUnit
edit_data.value.medicineDosageUnit = data.medicineDosageUnit
edit_data.value.medicineDosageNumber = data.medicineDosageNumber
edit_data.value.extra = data.extra
}
const contrastCodeSearch = ref()
const openContrastCodeSearch = () => {
@ -572,15 +641,29 @@ const openContrastCodeSearch = () => {
const contrastCodeConfirm = (data: any) => {
edit_data.value.hilistCode = data.hilistCode
}
let save = async () => {
let save = async (isClose:Boolean) => {
try {
await formRef.value.validate()
if (!edit_data.value.purchaseUnitPrice || edit_data.value.purchaseUnitPrice<1){
ElMessage.error('参考进价不能为空或小于1');
return
}
const data = JSON.parse(JSON.stringify(edit_data.value));
data.tags = data.tags ? data.tags.join(",") : null;
data.idCode = idCodeList.value.join(",");
data.type = _type.value;
post("goods/goods/save", data).then((res: any) => {
ElMessage.success('保存成功')
if (isClose){
//
exit()
return
}
//
initEditData()
})
// ......
} catch (e) {
@ -605,7 +688,7 @@ const cateCloseCallBack = () => {
let exit = () => {
document.addEventListener("click", handleClickOutside);
isShow.value = false
edit_data.value = {}
initEditData()
emit('close');
}
const handleClickOutside = (event: MouseEvent) => {
@ -675,21 +758,14 @@ watch(() => edit_data.value.hilistCode, (newVal) => {
})
const drugCategoryOptions = [
{
label: '西药',
value: 1301
label: '处方药',
value: 1
},
{
label: '药',
value: 1302
label: '非处方药',
value: 2
},
{
label: '非药品',
value: 1303
},
{
label: '其他',
value: 1304
}
]
const disableSale = () => {
@ -741,6 +817,22 @@ const enableSale = () => {
.common-layout {
margin-top: 10px;
padding: 0 24px 24px;
.antibacterial-agents{
display: flex;
.unit-item {
display: flex;
width: 50px;
.unit {
width: 32px;
height: 32px;
border: 1px #ddd solid;
color: #818080;
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
.item {

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="800" :height="720" :is-show="show" :top="100" @close="show=false" title="药品" :show-footer="true">
<Mask :width="800" :height="720" :is-show="show" @close="show=false" title="药品" :show-footer="true">
<div class="search_content_wrapper">
<div class="search_wrapper">
<span>药品名称:</span>
@ -15,13 +15,16 @@
<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"
highlight-current-row
@current-change="change_current_search_data_index"
@row-dblclick = confirm
:row-class-name="tableRowClassName">
<el-table-column prop="name" label="名称" fixed width="180" show-overflow-tooltip/>
<el-table-column :prop="type==1306?'json.reg_number' : 'json.approval_number'" fixed label="国药准字" width="180" v-if="type==1301 || type==1306" show-overflow-tooltip/>
<el-table-column prop="producer" label="生产企业" width="180" v-if="type==1301 || type==1306" show-overflow-tooltip/>
<el-table-column v-if="type==1301" prop="json.reg_specifications" label="注册规格" width="80"
<el-table-column v-if="type==1301" prop="json.reg_specifications" label="注册规格" width="120"
show-overflow-tooltip/>
<el-table-column prop="producer" label="生产企业" width="200" v-if="type==1301 || type==1306" 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"

View File

@ -3,13 +3,16 @@
<div class="name">
{{ hilistInfo.name }}
</div>
<div class="code"> {{ hilistInfo.code }}</div>
<!-- <div class="code"> {{ hilistInfo.code }}</div>-->
</div>
<div v-if="hilistInfo" class="hilist-detail">
<div class="name">
{{ hilistInfo.name }}
{{ hilistInfo.json?.category ? '[' + hilistInfo.json.category + ']' : '-' }}
</div>
<div>
{{ hilistInfo.code }}
</div>
<div>
{{ hilistInfo.producer }}
</div>
@ -101,11 +104,11 @@ onMounted(() => {
}
.hilist-detail {
padding: base.$padding-base;
margin-top: 5px;
margin-top: 3px;;
width: 100%;
height: 180px;
height: 250px;
border: 1px base.$border-color-base solid;
font-size: 14px;
font-size: 12px;
border-radius: 8px;
}

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="1200" :top="100" :is-show="isShow" @close="exit"
<Mask :width="1200" :is-show="isShow" @close="exit"
title="新增" :height="760" :show-footer="true">
<div class="add-panel" v-loading="isLoading" element-loading-text="正在保存......">
<div class="top">

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="1200" :top="100" :is-show="isShow" @close="exit"
<Mask :width="1200" :is-show="isShow" @close="exit"
title="编辑" :height="720" :show-footer="true">
<div class="edit-panel" v-loading="isLoading" element-loading-text="正在保存......">
<div class="top">

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="540" :height="603" :is-show="isShow" :top="100" @close="close" :title="id?'编辑':'添加供应商'" :show-footer="true">
<Mask :width="540" :height="603" :is-show="isShow" @close="close" :title="id?'编辑':'添加供应商'" :show-footer="true">
<div class="add-supplier" style="width:100%;margin-top: 24px;padding: 0 24px">
<div class="form">
<el-form style="width: 100%" ref="ruleFormRef" :model="formData" :inline=true label-position="top">

View File

@ -1,5 +1,5 @@
<template>
<Mask :top="100" :width="400" :height="400" :is-show="show">
<Mask :width="400" :height="400" :is-show="show">
<CloseBtn @click="close"></CloseBtn>
<el-card>
<template #header>

View File

@ -1,5 +1,5 @@
<template>
<Mask :width="800" :height="600" :is-show="show" :top="100" @close="close" title="药品" :show-footer="true">
<Mask :width="800" :height="600" :is-show="show" @close="close" title="药品" :show-footer="true">
<div class="search_content_wrapper" style="padding: 24px">
<div class="search_wrapper">
<span>项目名称:</span>

View File

@ -16,4 +16,7 @@ const itemUnitList = [
"次","项","针","根","颗","条","贴","副","袋","组","分钟","小时","穴位","部位",
"壮","牙","洞","根管"
]
export {dosageUnitList, packagingUnit, itemUnitList}
const DDDUnitList = [
"μg","mg","g","U","万U","MU"
]
export {dosageUnitList, packagingUnit, itemUnitList,DDDUnitList}

View File

@ -118,7 +118,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="100"></el-table-column>
<el-table-column label="最近效期" prop="recentlyExpiryDate" width="150"></el-table-column>
<el-table-column label="进价" width="120">
<template #default="scope">
@ -143,13 +143,13 @@
{{ getProfitCategory(scope.row.interestRate) }}
</template>
</el-table-column>
<el-table-column label="药品成本" prop="costPrice" show-overflow-tooltip>
<el-table-column label="药品成本" prop="costPrice" width="150">
<template #default="scope">
{{ scope.row.costPrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="医保码" prop="hilistCode" show-overflow-tooltip></el-table-column>
<el-table-column label="医保码" prop="hilistCode" width="240"></el-table-column>
<el-table-column label="标签" prop="producer" width="200">
@ -189,7 +189,7 @@
</div>
</div>
<Edit ref="editRef" @close="is_add = false;init()"/>
<Mask :is-show="open" :top="50" :height="600" @close="open = false" title="编辑">
<Mask :isShow="open" :height="600" @close="open = false" title="编辑">
<el-tabs v-model="activeName" @tab-change="changeTab">
<el-tab-pane label="商品信息" name="first">
<Edit ref="editRef" @close="open = false;init()"/>