This commit is contained in:
ChenQiuYu 2025-05-21 14:00:31 +08:00
parent c6953c2b0b
commit 53e42c3574
7 changed files with 203 additions and 139 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<Mask :width="400" :height="600" :is-show="isShow" @close="isShow=false" :show-footer="true" title="药品列表"> <Mask :width="400" :height="600" :is-show="isShow" @close="isShow=false" :show-footer="true" title="商品类型">
<el-table <el-table
:data="cateList" :data="cateList"
style="width: 100%" style="width: 100%"
@ -11,13 +11,12 @@
<span v-else>{{ scope.row.name }}</span> <span v-else>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column>
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> <span class="small-btn" @click="saveDo">确定</span>
<el-button size="small" @click="cancelAdd" class="btn">取消</el-button> <span class="small-btn" @click="cancelAdd" style="margin-left: 24px">取消</span>
</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>
@ -31,8 +30,8 @@
</el-table> </el-table>
<template #footer> <template #footer>
<div class="bottom"> <div class="bottom">
<el-button type="primary" @click="add" id="add">添加</el-button> <span class="default-btn" @click="add" id="add">添加</span>
<el-button type="primary" @click="save">保存</el-button> <span class="default-btn" @click="save" style="margin-left: 24px">保存</span>
</div> </div>
</template> </template>
</Mask> </Mask>
@ -118,10 +117,9 @@ const saveDo = async () => {
} }
}) })
if (cateList.value.length === 0) return
await post("goods/cate/save", {cateList: cateList.value}) await post("goods/cate/save", {cateList: cateList.value})
getCateList() getCateList()
} }
const init = () => { const init = () => {
isShow.value = true isShow.value = true

View File

@ -3,10 +3,7 @@
<template #default> <template #default>
<el-scrollbar> <el-scrollbar>
<div class="header"> <div class="header">
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0" <span class="default-btn" style="margin:10px auto" @click="openCreateSearch" v-if="_type!=0">一键建档 </span>
plain>
一键建档
</el-button>
</div> </div>
<div class="common-layout"> <div class="common-layout">
<el-container> <el-container>
@ -412,7 +409,8 @@
</el-input> </el-input>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px" v-if="_type !=0"> <el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px"
v-if="_type !=0">
<el-descriptions-item label="医保对码"> <el-descriptions-item label="医保对码">
<SocialInfo v-model="edit_data.hilistCode" <SocialInfo v-model="edit_data.hilistCode"
@openSearch="openContrastCodeSearch"></SocialInfo> @openSearch="openContrastCodeSearch"></SocialInfo>
@ -427,12 +425,12 @@
<template #footer> <template #footer>
<div class="footer"> <div class="footer">
<el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button> <span class="default-btn" @click="returnInit" v-if="edit_data.id != null">医保库存重新初始化</span>
<el-button v-if="edit_data.saleStatus" type="danger" @click="disableSale">停售</el-button> <span class="default-btn" v-if="edit_data.saleStatus" @click="disableSale" style="margin: 0 24px">停售</span>
<el-button v-else type="danger" @click="enableSale">起售</el-button> <span class="default-btn" v-else @click="enableSale">起售</span>
<el-button @click="save(true)" type="primary">保存</el-button> <span class="default-btn" @click="save(true)" style="margin: 0 24px">保存</span>
<el-button @click="save(false)" type="primary" v-if="edit_data.id == null">保存并继续</el-button> <span class="default-btn" @click="save(false)" v-if="edit_data.id == null">保存并继续</span>
<el-button @click="exit" plain>关闭</el-button> <span class="default-btn" @click="exit" style="margin-left: 24px">关闭</span>
</div> </div>
</template> </template>
</Mask> </Mask>
@ -658,16 +656,14 @@ const createConfirm = (data: any) => {
edit_data.value.medicineDosageUnit = data.medicineDosageUnit edit_data.value.medicineDosageUnit = data.medicineDosageUnit
edit_data.value.medicineDosageNumber = data.medicineDosageNumber edit_data.value.medicineDosageNumber = data.medicineDosageNumber
edit_data.value.extra = data.extra edit_data.value.extra = data.extra
} } else if (_type.value == 1302) {
else if (_type.value == 1302){
edit_data.value.name = data.name edit_data.value.name = data.name
edit_data.value.hilistCode = data.hilistCode edit_data.value.hilistCode = data.hilistCode
edit_data.value.commonName = data.commonName edit_data.value.commonName = data.commonName
edit_data.value.packagingUnit = "g" edit_data.value.packagingUnit = "g"
edit_data.value.minPackagingNumber = 1 edit_data.value.minPackagingNumber = 1
edit_data.value.minPackagingUnit = "g" edit_data.value.minPackagingUnit = "g"
} } else if (_type.value == 1306) {
else if (_type.value == 1306){
edit_data.value.name = data.name edit_data.value.name = data.name
edit_data.value.hilistCode = data.hilistCode edit_data.value.hilistCode = data.hilistCode
edit_data.value.commonName = data.commonName edit_data.value.commonName = data.commonName
@ -850,27 +846,23 @@ const enableSale = () => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.header { .header {
.title { width: 100%;
font-size: 18px; display: flex;
font-weight: bold; justify-content: space-between;
} align-items: center;
.btn {
display: block;
width: 200px;
height: 40px;
margin: auto;
}
} }
.common-layout { .common-layout {
margin-top: 10px; margin-top: 10px;
padding: 0 24px 24px; padding: 0 24px 24px;
.antibacterial-agents { .antibacterial-agents {
display: flex; display: flex;
.unit-item { .unit-item {
display: flex; display: flex;
width: 50px; width: 50px;
.unit { .unit {
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -923,6 +915,11 @@ const enableSale = () => {
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
padding: 0 24px; padding: 0 24px;
.default-btn{
&:nth-child(1){
width: 200px;
}
}
} }
</style> </style>

View File

@ -2,14 +2,14 @@
<Mask :width="800" :height="720" :is-show="show" @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_content_wrapper">
<div class="search_wrapper"> <div class="search_wrapper">
<span>药品名称:</span> <span>药品名称</span>
<el-input <el-input
class="input" class="input"
v-model="keyword" v-model="keyword"
placeholder="请输入药品名称或者编号" placeholder="请输入药品名称或者编号"
@keydown.enter="search_social" @keydown.enter="search_social"
clearable/> clearable/>
<el-button @click="search_social">搜索</el-button> <span class="default-btn" @click="search_social">搜索</span>
</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">
@ -49,8 +49,8 @@
v-model:current-page="current_page" @current-change="change_page"/> v-model:current-page="current_page" @current-change="change_page"/>
</div> </div>
<div class="btn"> <div class="btn">
<el-button type="primary" @click="confirm">确认</el-button> <span class="default-btn" @click="confirm">确认</span>
<el-button type="primary" @click="close">关闭</el-button> <span class="default-btn" style="margin-left:24px" @click="close">关闭</span>
</div> </div>
</div> </div>
</template> </template>
@ -205,23 +205,20 @@ const close = () => {
position: relative; position: relative;
width: 100%; width: 100%;
display: flex; display: flex;
margin: 0 auto; align-items: center;
height: 60px; height: 60px;
span { span {
position: relative; position: relative;
display: block; display: block;
width: 100px;
text-align: right;
line-height: 40px;
} }
.input { .input {
display: block; display: block;
flex: 1; flex: 1;
min-width: 0;
} }
button { button {
width: 80px; width: 80px;
line-height: 40px; line-height: 40px;
@ -248,4 +245,7 @@ const close = () => {
width: 100%; width: 100%;
height: 400px; height: 400px;
} }
:deep(.el-input__wrapper){
height: 42px;
}
</style> </style>

View File

@ -61,13 +61,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item prop="supplierId" label="供应商"> <el-form-item prop="supplierId" label="供应商" style="margin-bottom: 0">
<el-select <el-select v-if="orderInfoIsEdit" style="width: 196px;margin-right: 10px"
v-model="inventory_order_data.supplierId" v-model="inventory_order_data.supplierId"
placeholder="请选择供应商" placeholder="请选择供应商">
v-if="orderInfoIsEdit"
style="width: 130px;margin-right: 10px"
>
<el-option <el-option
v-for="item in supplier_list" v-for="item in supplier_list"
:key="item.id" :key="item.id"
@ -75,8 +72,20 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<el-button v-if="orderInfoIsEdit" type="primary" @click="addSupplier">添加供应商</el-button> <div v-if="orderInfoIsEdit" class="default-btn"
<span style="width: 234px;" class="order-info" v-if="!orderInfoIsEdit">{{ inventory_order_data.supplierName }}</span> style="
height: 32px;
width: 32px;
line-height: 32px;
border: 1px solid rgb(192, 196, 204);
background-color: #fff;"
@click="addSupplier">
<el-icon style="color: rgb(192, 196, 204)">
<Plus/>
</el-icon>
</div>
<span style="width: 234px;" class="order-info"
v-if="!orderInfoIsEdit">{{ inventory_order_data.supplierName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -87,8 +96,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="操作"> <el-form-item label="操作">
<el-button type="primary" @click="saveOrderEdit" v-if="orderInfoIsEdit" plain>保存</el-button> <span class="default-btn form-item" @click="saveOrderEdit" v-if="orderInfoIsEdit">保存</span>
<el-button type="primary" @click="editOrder" v-else plain>编辑</el-button> <span class="default-btn form-item" @click="editOrder" v-else>编辑</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -96,18 +105,19 @@
</div> </div>
<div class="table_content"> <div class="table_content">
<div class="add_goods"> <div class="add_goods">
<el-button type="primary" @click="changeShowGoodSearch">{{ showGoodSearch ? '取消' : '添加药品' }}</el-button> <span class="default-btn" @click="changeShowGoodSearch">{{ showGoodSearch ? '取消' : '添加药品' }}</span>
<div class="search"> <div class="search">
<GoodsSearch v-if="showGoodSearch" @selectCallBack="goodsSelectCallBack"></GoodsSearch> <GoodsSearch v-if="showGoodSearch" @selectCallBack="goodsSelectCallBack"></GoodsSearch>
</div> </div>
</div> </div>
<el-table :data="table_list" style="width: 100%" height="250"> <el-table :data="table_list" style="width: 100%" height="250"
:header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column prop="name" label="药品名称" width="180" show-overflow-tooltip/> <el-table-column prop="name" label="药品名称" width="180" show-overflow-tooltip/>
<el-table-column label="售价" prop="unitPrice" width="80"> <el-table-column label="售价" prop="unitPrice" width="80" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="单位" prop="packagingUnit" width="80"> <el-table-column label="单位" prop="packagingUnit" width="80" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="数量" width="110"> <el-table-column label="数量" width="110" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-input-number <el-input-number
v-model="scope.row.wholeNumber" v-model="scope.row.wholeNumber"
@ -122,7 +132,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进价" width="110"> <el-table-column label="进价" width="110" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-input-number <el-input-number
v-model="scope.row.purchaseUnitPrice" v-model="scope.row.purchaseUnitPrice"
@ -136,14 +146,14 @@
<span v-else>{{ scope.row.purchaseUnitPrice }}</span> <span v-else>{{ scope.row.purchaseUnitPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产批号" width="150" prop="productionBatchCode"> <el-table-column label="生产批号" width="150" prop="productionBatchCode" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.productionBatchCode" placeholder="生产批号" style="width: 100px" size="small" <el-input v-model="scope.row.productionBatchCode" placeholder="生产批号" style="width: 100px" size="small"
v-if="scope.row.isEdit"/> v-if="scope.row.isEdit"/>
<span v-else>{{ scope.row.productionBatchCode }}</span> <span v-else>{{ scope.row.productionBatchCode }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产日期" width="140"> <el-table-column label="生产日期" width="140" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-date-picker <el-date-picker
v-model="scope.row.productionDate" v-model="scope.row.productionDate"
@ -158,7 +168,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="有效日期" width="140"> <el-table-column label="有效日期" width="140" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-date-picker <el-date-picker
v-model="scope.row.expiryDate" v-model="scope.row.expiryDate"
@ -172,21 +182,21 @@
<span v-else>{{ scope.row.expiryDate }}</span> <span v-else>{{ scope.row.expiryDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="addOneGoods(scope.row)" type="primary" plain <span class="default-btn table-item" @click="addOneGoods(scope.row)"
v-if="!scope.row.id&&scope.row.isEdit">保存 v-if="!scope.row.id&&scope.row.isEdit">保存
</el-button> </span>
<el-button size="small" @click="removeTableRow(scope.row)" type="danger" plain v-if="!scope.row.id">移除 <span class="default-btn table-item" @click="removeTableRow(scope.row)" v-if="!scope.row.id">移除
</el-button> </span>
<el-button size="small" @click="saveGoodEdit(scope.row)" type="primary" plain <span class="default-btn table-item" @click="saveGoodEdit(scope.row)"
v-if="scope.row.id&&scope.row.isEdit">保存 v-if="scope.row.id&&scope.row.isEdit">保存
</el-button> </span>
<el-button size="small" @click="openGoodEdit(scope.row)" type="primary" plain <span class="default-btn table-item" @click="openGoodEdit(scope.row)"
v-if="scope.row.id&&!scope.row.isEdit">编辑 v-if="scope.row.id&&!scope.row.isEdit">编辑
</el-button> </span>
<el-button size="small" @click="returnableOne(scope.row.id)" type="danger" plain v-if="scope.row.id">退货 <span class="default-btn table-item" @click="returnableOne(scope.row.id)" v-if="scope.row.id">退货
</el-button> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -200,8 +210,8 @@
style="color: #FF282E">{{ inventory_order_data.totalPrice.toFixed(2) }}</span> style="color: #FF282E">{{ inventory_order_data.totalPrice.toFixed(2) }}</span>
</div> </div>
<div class="btn"> <div class="btn">
<el-button type="danger" @click="returnableAll()" plain>整单退货</el-button> <span class="default-btn" @click="returnableAll()">整单退货</span>
<el-button type="primary" @click="exit">关闭</el-button> <span class="default-btn" @click="exit">关闭</span>
</div> </div>
</div> </div>
</template> </template>
@ -211,7 +221,6 @@
<Mask :is-show="is_add"> <Mask :is-show="is_add">
<Edit ref="editRef" @close="is_add = false;"/> <Edit ref="editRef" @close="is_add = false;"/>
</Mask> </Mask>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -223,6 +232,7 @@ import {ElMessage, ElMessageBox} from "element-plus";
import GoodsSearch from "@/components/inventory/GoodsSearch.vue"; import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
import CloseBtn from "@/components/CloseBtn.vue"; import CloseBtn from "@/components/CloseBtn.vue";
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue"; import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
import {Plus} from "@element-plus/icons-vue"
const props = defineProps({ const props = defineProps({
code: { code: {
@ -533,4 +543,35 @@ defineExpose({init})
color: #333333; color: #333333;
font-style: normal; font-style: normal;
} }
.order-info {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.btn {
.default-btn {
margin-right: 24px;
&:last-child {
margin-right: 0;
}
}
}
.form-item {
width: 60px;
height: 31px;
line-height: 31px;
}
.table-item{
width: 48px;
height: 25px;
line-height: 25px;
font-size: 12px;
margin-right: 10px;
:last-child{
margin-right: 0;
}
}
</style> </style>

View File

@ -171,11 +171,11 @@
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="statistics"> <div class="statistics">
<div style="margin-right: 40px">总成本{{ statisticsData.totalCost }}</div> <div style="margin-right: 40px">总成本{{ statisticsData.totalCost || 0.00 }}</div>
<div style="margin-right: 40px">总售价{{ statisticsData.totalPrice }}</div> <div style="margin-right: 40px">总售价{{ statisticsData.totalPrice||0.00 }}</div>
<div style="margin-right: 40px">医保药品{{ statisticsData.totalSocialCount }}</div> <div style="margin-right: 40px">医保药品{{ statisticsData.totalSocialCount||0 }}</div>
<div v-for="item in statisticsData.chrgitmLvInfoList" style="margin-right: 40px"> <div v-for="item in statisticsData.chrgitmLvInfoList" style="margin-right: 40px">
{{ item.name }}{{ item.ratio }}({{ item.count }}) <span> {{ item.name }}{{ item.ratio||0.00 }}({{ item.count }})</span>
</div> </div>
</div> </div>
<div class="page_btn_list"> <div class="page_btn_list">

View File

@ -78,7 +78,6 @@
</div> </div>
</div> </div>
<div class="content_list"> <div class="content_list">
<el-scrollbar>
<el-table :data="tableData" style="width: 100%;height: 100%" @row-click="open_edit" <el-table :data="tableData" style="width: 100%;height: 100%" @row-click="open_edit"
:header-cell-style="{ backgroundColor: '#F1F5FB' }"> :header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column fixed label="采购单号" show-overflow-tooltip> <el-table-column fixed label="采购单号" show-overflow-tooltip>
@ -86,18 +85,18 @@
<div class="link">{{ scope.row.code }}</div> <div class="link">{{ scope.row.code }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="货单号" prop="shippingCode"> <el-table-column label="货单号" prop="shippingCode" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="品种" prop="kindCount"> <el-table-column label="品种" prop="kindCount" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="入库金额"> <el-table-column label="入库金额" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
{{ scope.row.totalPrice.toFixed(2) }} {{ scope.row.totalPrice.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购人" prop="managerUserName"></el-table-column> <el-table-column label="采购人" prop="managerUserName" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="supplierName"></el-table-column> <el-table-column label="供应商" prop="supplierName" show-overflow-tooltip></el-table-column>
<el-table-column prop="purchaseDate" label="采购时间"> <el-table-column prop="purchaseDate" label="采购时间" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
{{ formatDate(scope.row.purchaseDate) }} {{ formatDate(scope.row.purchaseDate) }}
</template> </template>
@ -107,10 +106,9 @@
<!-- {{ formatDate(scope.row.purchaseDate) }}--> <!-- {{ formatDate(scope.row.purchaseDate) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="备注" prop="remark"> <el-table-column label="备注" prop="remark" show-overflow-tooltip>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-scrollbar>
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="page_btn_list"> <div class="page_btn_list">
@ -159,7 +157,7 @@ const openAdd = () => {
const editOrderRef = ref<any>('') const editOrderRef = ref<any>('')
let open_edit = (row: any) => { let open_edit = (row: any) => {
nextTick(() => { nextTick(() => {
editOrderRef.value.init(row.code) editOrderRef.value?.init(row.code)
}) })
} }

View File

@ -24,6 +24,7 @@
</div> </div>
</div> </div>
<div class="middel"> <div class="middel">
<span class="default-btn" v-loading="syncCacheLoading" @click="syncCache">同步缓存</span>
</div> </div>
<div class="op_btn"> <div class="op_btn">
<el-dropdown placement="bottom"> <el-dropdown placement="bottom">
@ -370,6 +371,35 @@ const update1319 = (current_page: number) => {
} }
}) })
} }
const syncCachePage = ref<any>(1)
const syncCacheTotalPage = ref<any>(0)
const syncCacheLoading=ref(false)
const syncCache = () => {
if(syncCachePage.value==1){
syncCacheLoading.value = true
ElNotification({
title: '提示',
message: "正在同步,请稍后......",
type: 'warning',
})
}
post("social/directory/syncToMongo", {page: syncCachePage.value}).then((res: any) => {
if(res.total_page){
syncCacheTotalPage.value = res.total_page
}
if (syncCachePage.value <= syncCacheTotalPage.value) {
syncCachePage.value++
syncCache()
}else{
syncCacheLoading.value = false
ElNotification({
title: '提示',
message: "同步完成",
type: 'success',
})
}
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">