药品管理
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<!-- Modal -->
|
||||
<a-modal v-model:visible="modalVisible" fullscreen title="药品详情" title-align="start" :footer="false"
|
||||
@cancel="handleClose">
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">基本信息</div>
|
||||
</div>
|
||||
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="药品名称:">
|
||||
<span>{{modalForm.product_name}} </span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="药品类型:" >
|
||||
<div class="box" >
|
||||
<div class="cardNum">{{formatProductType(modalForm.product_type)
|
||||
}}</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="药品价格:" >
|
||||
<div class="cardNum">{{modalForm.product_price}}元</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="药品规格:">
|
||||
<span>{{modalForm.product_spec
|
||||
}} </span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="批准文号:" >
|
||||
<div class="cardNum">{{modalForm.license_number
|
||||
}}</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="生产厂家:">
|
||||
<span>{{modalForm.manufacturer
|
||||
}} </span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="药店编码:">
|
||||
<span>{{modalForm.product_pharmacy_code
|
||||
}} </span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="处方平台编码:" >
|
||||
<div class="cardNum">{{modalForm.product_platform_code
|
||||
}}</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="创建时间:">
|
||||
<span>{{modalForm.created_at
|
||||
}} </span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- <a-divider /> -->
|
||||
|
||||
<!-- <div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">病例信息</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider /> -->
|
||||
|
||||
</a-form>
|
||||
<!-- <div class="titlebox" >
|
||||
<div class="bar"></div>
|
||||
<div class="name">操作</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;" >
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space >
|
||||
<a-button type="primary" status="danger" @click="">禁用</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row> -->
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref,toRefs} from 'vue';
|
||||
import {decryptCard} from '@/api/doctor/list';
|
||||
import {decryptMobile} from '@/api/patient/family';
|
||||
import {formatProductType} from "@/utils/format"
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['familyVisibleChange']);
|
||||
const {modalVisible,modalForm} = toRefs(props);
|
||||
//切换小眼睛
|
||||
const showEye = ref(false);
|
||||
const id_card_num = ref('');
|
||||
//解密身份证号码
|
||||
const handelDecryptCard = async (user_id,family_id) => {
|
||||
showEye.value = true;
|
||||
const { data, code, message } = await decryptCard({
|
||||
user_id,
|
||||
family_id
|
||||
});
|
||||
if (code == 200) {
|
||||
id_card_num.value = data;
|
||||
}
|
||||
};
|
||||
//切换手机号
|
||||
const count_Eye= ref(false);
|
||||
const family_Eye= ref(false);
|
||||
const count_mobile=ref('');
|
||||
const family_mobile=ref('')
|
||||
const handleDecryptMobile=async(user_id,family_id='')=>{
|
||||
let dataObj=null;
|
||||
if(family_id){
|
||||
dataObj={ user_id,family_id}
|
||||
family_Eye.value=true
|
||||
}else{
|
||||
dataObj={ user_id,family_id};
|
||||
count_Eye.value=true
|
||||
}
|
||||
const { data, code, message } = await decryptMobile(dataObj);
|
||||
if(code==200){
|
||||
if(family_id){
|
||||
family_mobile.value=data
|
||||
}else{
|
||||
count_mobile.value=data;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('familyVisibleChange', false);
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.cardNum {
|
||||
width: 150px;
|
||||
}
|
||||
.arco-form-item-layout-horizontal:first-child,
|
||||
.arco-form-item-layout-horizontal:nth-child(2) {
|
||||
align-items: center;
|
||||
}
|
||||
.cellbox{
|
||||
margin-top: 35px;
|
||||
}
|
||||
.cellbox .cell{
|
||||
width:50%;
|
||||
border-bottom:1px dashed #efefef;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.cellbox .cell:first-child{
|
||||
border: none;
|
||||
}
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cert .arco-form-item-label-col {
|
||||
flex: 0 0 8px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<!-- Modal -->
|
||||
<a-modal v-model:visible="modalVisible" fullscreen :title="modalTitle" title-align="start" :footer="false"
|
||||
@cancel="handleClose">
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">基本信息</div>
|
||||
</div>
|
||||
<a-form :model="modalForm" :rules="rules" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="药品名称:">
|
||||
<a-input v-model="modalForm.product_name" :style="{ width: '200px' }" placeholder="请输入身份证号" />
|
||||
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="药品规格:">
|
||||
<span v-if="modalForm.product_spec">{{modalForm.product_spec}} </span>
|
||||
<span v-else>选择药品后展示</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="药品编码:" >
|
||||
<div class="cardNum" v-if="modalForm.product_pharmacy_code">{{modalForm.product_pharmacy_code}}</div>
|
||||
<span v-else>选择药品后展示</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="药品库存:" >
|
||||
<div class="box" >
|
||||
<div class="cardNum" v-if="modalForm.stock!=''">{{modalForm.stock}}</div>
|
||||
<span v-else>选择药品后展示</span>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!--<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="药品价格:" >
|
||||
<div class="cardNum">{{modalForm.product_price}}元</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="药品类型:" >
|
||||
<div class="box" >
|
||||
<div class="cardNum">{{formatProductType(modalForm.product_type)}}</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row> -->
|
||||
<a-row :gutter="24" >
|
||||
<!-- <a-col :span="12">
|
||||
<a-form-item field="idCard" label="批准文号:" >
|
||||
<div class="cardNum">{{modalForm.license_number}}</div>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="生产厂家:">
|
||||
<span v-if="modalForm.manufacturer">{{modalForm.manufacturer}} </span>
|
||||
<span v-else>选择药品后展示</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- <a-row :gutter="24" >
|
||||
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="处方平台编码:" >
|
||||
<div class="cardNum">{{modalForm.product_platform_code}}</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="创建时间:">
|
||||
<span>{{modalForm.created_at}} </span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row> -->
|
||||
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">用法用量</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="packaging_unit" label="包装单位:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.packaging_unit" placeholder="请输入包装单位" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="single_use" label="单次服法:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.single_use" placeholder="请输入单次服法" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="single_unit" label="每次剂量:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.single_unit" placeholder="请输入每次剂量" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="frequency_use" label="使用频次:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.frequency_use" placeholder="请输入使用频次" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="available_days" label="用药天数:">
|
||||
<a-input-number :style="{ width: '200px' }" v-model="modalForm.available_days" :min="1" placeholder="请输入用药天数" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox" >
|
||||
<div class="bar"></div>
|
||||
<div class="name">购买上限</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="prescription_num" label="购买上限:">
|
||||
<a-input-number :style="{ width: '200px' }" v-model="modalForm.prescription_num" :min="1" placeholder="请输入购买上限" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
</a-form>
|
||||
<div class="titlebox" >
|
||||
<div class="bar"></div>
|
||||
<div class="name">操作</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;" >
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space >
|
||||
<a-button type="primary" @click="" v-if="modalSatus=='add'">上架</a-button>
|
||||
<a-button type="primary" status="success" @click="" v-if="modalSatus=='edit'">重新上架</a-button>
|
||||
<a-button type="primary" status="warning" @click="" v-if="modalSatus=='edit'">下架</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref,toRefs} from 'vue';
|
||||
import {formatProductType} from "@/utils/format"
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
modalTitle:{
|
||||
type: String,
|
||||
},
|
||||
modalSatus:{
|
||||
type: String
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
const rules={
|
||||
product_name: [{ required: true, message: '请输入药品名称' }],
|
||||
packaging_unit: [{ required: true, message: '请输入包装单位' }],
|
||||
single_use: [{ required: true, message: '请输入单次服法' }],
|
||||
single_unit: [{ required: true, message: '请输入每次剂量' }],
|
||||
frequency_use: [{ required: true, message: '请输入使用频次' }],
|
||||
available_days: [{ required: true, message: '请输入用药天数' }],
|
||||
prescription_num: [{ required: true, message: '请输入购买上限' }]
|
||||
};
|
||||
const emits = defineEmits(['familyVisibleChange']);
|
||||
const {modalVisible,modalForm,modalSatus} = toRefs(props);
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('familyVisibleChange', false);
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.cardNum {
|
||||
width: 150px;
|
||||
}
|
||||
.arco-form-item-layout-horizontal:first-child,
|
||||
.arco-form-item-layout-horizontal:nth-child(2) {
|
||||
align-items: center;
|
||||
}
|
||||
.cellbox{
|
||||
margin-top: 35px;
|
||||
}
|
||||
.cellbox .cell{
|
||||
width:50%;
|
||||
border-bottom:1px dashed #efefef;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.cellbox .cell:first-child{
|
||||
border: none;
|
||||
}
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cert .arco-form-item-label-col {
|
||||
flex: 0 0 8px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user