Merge remote-tracking branch 'origin/main'

This commit is contained in:
牛子源 2025-05-21 14:34:00 +08:00
commit ad2f798b50
11 changed files with 222 additions and 146 deletions

View File

@ -70,11 +70,9 @@ import {Monitor} from '@element-plus/icons-vue'
const show = ref(false) const show = ref(false)
const list = ref() const list = ref<any>()
const orderInfo = ref()
const init = (data: any) => { const init = (data: any) => {
list.value = data list.value = data
console.log(list)
show.value = true show.value = true
} }
const close = () => { const close = () => {
@ -262,6 +260,9 @@ const addTraceAbilityCodeHandler = (item: any, code: any) => {
&:first-child { &:first-child {
width: 132px; width: 132px;
padding-left: 25px; padding-left: 25px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
&:last-child { &:last-child {

View File

@ -29,11 +29,11 @@
<div>费用类别:&nbsp;<span class="detail-doctor">{{ seeDockerInfo.registerType == 2 ? '医保' : '自费' }}</span> <div>费用类别:&nbsp;<span class="detail-doctor">{{ seeDockerInfo.registerType == 2 ? '医保' : '自费' }}</span>
</div> </div>
<div>医保卡剩余金额:&nbsp;<span class="detail-balance">{{ <div>医保卡剩余金额:&nbsp;<span class="detail-balance">{{
seeDockerInfo.patientInfo.socialBalance ? seeDockerInfo.patientInfo.socialBalance + "元" : "-" seeDockerInfo.patientInfo.socialBalance ? seeDockerInfo.patientInfo.socialBalance + "元" : "0"
}}</span></div> }}</span></div>
</div> </div>
<div>上次就诊时间:&nbsp;<span class="detail-doctor">{{ <div>上次就诊时间:&nbsp;<span class="detail-doctor">{{
formatDate(seeDockerInfo?.lastSeeDoctorTime) || '-' formatDate(seeDockerInfo?.lastSeeDoctorTime)
}}</span></div> }}</span></div>
</div> </div>
</div> </div>

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>
@ -282,10 +279,10 @@
<el-input v-model="edit_data.extra.cabinetNumber"> <el-input v-model="edit_data.extra.cabinetNumber">
</el-input> </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.usage">--> <!-- <el-input v-model="edit_data.extra.usage">-->
<!-- </el-input>--> <!-- </el-input>-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<el-descriptions-item label="处方药/OTC" v-if="_type==1301"> <el-descriptions-item label="处方药/OTC" v-if="_type==1301">
<el-select <el-select
v-model="edit_data.extra.drugCategory" v-model="edit_data.extra.drugCategory"
@ -318,32 +315,32 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="抗菌药物|DDD值" v-if="_type==1301"> <el-descriptions-item label="抗菌药物|DDD值" v-if="_type==1301">
<div class="antibacterial-agents"> <div class="antibacterial-agents">
<el-select <el-select
v-model="edit_data.extra.isAntibacterialAgents" v-model="edit_data.extra.isAntibacterialAgents"
clearable clearable
style="width: 100px" 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> <el-option
<div class="unit" style="width: 232px">{{ edit_data.extra.DDDUnit }}</div> v-for="item in isAntibacterialAgentsOptions"
</template> :key="item.label"
<UnitSelector :units="DDDUnitList" v-model="edit_data.extra.DDDUnit"></UnitSelector> :label="item.label"
</el-popover> :value="item.label"
</div> />
</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> </div>
</el-descriptions-item> </el-descriptions-item>
@ -375,12 +372,12 @@
<el-form style="width: 100%;" :rules="rules" ref="formRef" label-width="100px"> <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 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"> <el-input v-model.number="edit_data.purchaseUnitPrice" type="number" :min="1">
<template #prefix></template> <template #prefix></template>
</el-input> </el-input>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="定价模式" > <el-descriptions-item label="定价模式">
<el-select v-model="edit_data.pricingModel" placeholder="请选择"> <el-select v-model="edit_data.pricingModel" placeholder="请选择">
<el-option <el-option
v-for="item in pricingModelOptions" v-for="item in pricingModelOptions"
@ -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>
@ -444,7 +442,7 @@
<script setup lang="ts"> <script setup lang="ts">
import {nextTick, ref, watch} from "vue"; import {nextTick, ref, watch} from "vue";
import {dosageUnitList, packagingUnit,DDDUnitList} from "@/utils/unitList.ts" import {dosageUnitList, packagingUnit, DDDUnitList} from "@/utils/unitList.ts"
import {Setting, Close} from "@element-plus/icons-vue"; import {Setting, Close} from "@element-plus/icons-vue";
import Mask from "@/components/common/Mask.vue"; import Mask from "@/components/common/Mask.vue";
import Search from "@/components/inventory/goods/Search.vue"; import Search from "@/components/inventory/goods/Search.vue";
@ -569,8 +567,8 @@ let edit_data: any = ref({
packagingUnit: "盒", packagingUnit: "盒",
pricingModel: 0, pricingModel: 0,
expiryWarnDays: 0, expiryWarnDays: 0,
inventoryWarnNumber:0, inventoryWarnNumber: 0,
purchaseUnitPrice:1 purchaseUnitPrice: 1
}); });
const initEditData = () => { const initEditData = () => {
edit_data.value = { edit_data.value = {
@ -580,8 +578,8 @@ const initEditData = () => {
packagingUnit: "盒", packagingUnit: "盒",
pricingModel: 0, pricingModel: 0,
expiryWarnDays: 0, expiryWarnDays: 0,
inventoryWarnNumber:0, inventoryWarnNumber: 0,
purchaseUnitPrice:1 purchaseUnitPrice: 1
} }
} }
const idCode = ref(""); const idCode = ref("");
@ -647,32 +645,30 @@ const openCreateSearch = () => {
}); });
} }
const createConfirm = (data: any) => { const createConfirm = (data: any) => {
if (_type.value == 1301){ if (_type.value == 1301) {
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.approvalCode = data.approvalCode edit_data.value.approvalCode = data.approvalCode
edit_data.value.producer = data.producer edit_data.value.producer = data.producer
edit_data.value.packagingUnit = data.packagingUnit edit_data.value.packagingUnit = data.packagingUnit
edit_data.value.minPackagingNumber = data.minPackagingNumber edit_data.value.minPackagingNumber = data.minPackagingNumber
edit_data.value.minPackagingUnit = data.minPackagingUnit edit_data.value.minPackagingUnit = data.minPackagingUnit
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
edit_data.value.approvalCode = data.approvalCode edit_data.value.approvalCode = data.approvalCode
edit_data.value.producer = data.producer edit_data.value.producer = data.producer
edit_data.value.specification = data.specification edit_data.value.specification = data.specification
edit_data.value.packagingUnit = data.packagingUnit edit_data.value.packagingUnit = data.packagingUnit
edit_data.value.minPackagingUnit = data.minPackagingUnit edit_data.value.minPackagingUnit = data.minPackagingUnit
@ -691,10 +687,10 @@ const openContrastCodeSearch = () => {
const contrastCodeConfirm = (data: any) => { const contrastCodeConfirm = (data: any) => {
edit_data.value.hilistCode = data.hilistCode edit_data.value.hilistCode = data.hilistCode
} }
let save = async (isClose:Boolean) => { let save = async (isClose: Boolean) => {
try { try {
await formRef.value.validate() await formRef.value.validate()
if (!edit_data.value.purchaseUnitPrice || edit_data.value.purchaseUnitPrice<1){ if (!edit_data.value.purchaseUnitPrice || edit_data.value.purchaseUnitPrice < 1) {
ElMessage.error('参考进价不能为空或小于1'); ElMessage.error('参考进价不能为空或小于1');
return return
} }
@ -704,7 +700,7 @@ let save = async (isClose:Boolean) => {
data.type = _type.value; data.type = _type.value;
post("goods/goods/save", data).then((res: any) => { post("goods/goods/save", data).then((res: any) => {
ElMessage.success('保存成功') ElMessage.success('保存成功')
if (isClose){ if (isClose) {
// //
exit() exit()
return return
@ -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

@ -9,6 +9,7 @@
label-width="auto" label-width="auto"
:rules="rules" :rules="rules"
ref="form" ref="form"
style="height: 100%;width: 100%"
> >
<el-descriptions <el-descriptions
border border
@ -206,7 +207,7 @@ const rules = ref<any>({
{type: 'number', message: '年龄必须为数字值', trigger: 'blur'}, {type: 'number', message: '年龄必须为数字值', trigger: 'blur'},
], ],
gender: [ gender: [
{required: true, message: '请选择性别', trigger: 'blur'}, {required: true, message: '请选择性别', trigger: 'change'},
], ],
spec: [ spec: [
{required: true, message: '请输入规格', trigger: 'blur'}, {required: true, message: '请输入规格', trigger: 'blur'},
@ -225,7 +226,10 @@ const rules = ref<any>({
], ],
visitType: [ visitType: [
{required: true, message: '请选择就诊类型', trigger: 'blur'}, {required: true, message: '请选择就诊类型', trigger: 'blur'},
] ],
type: [
{required: true, message: '请选择费用类型', trigger: 'change'},
],
}) })
const isShow = ref(false) const isShow = ref(false)
const emit = defineEmits(['close']) const emit = defineEmits(['close'])

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

@ -220,11 +220,18 @@ const reset = () => {
.name { .name {
color: #999; color: #999;
width: 100px; width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.section_name { .section_name {
flex: 1; flex: 1;
color: #999; color: #999;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.btn { .btn {

View File

@ -24,10 +24,11 @@
</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">
<div class="default-btn">目录更新</div> <div class="default-btn" >目录更新</div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item @click="start_type">基础更新</el-dropdown-item> <el-dropdown-item @click="start_type">基础更新</el-dropdown-item>
@ -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">