Merge branch 'dev'
This commit is contained in:
commit
5d8865bab1
9
auto-imports.d.ts
vendored
Normal file
9
auto-imports.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
}
|
||||
19
components.d.ts
vendored
19
components.d.ts
vendored
@ -9,10 +9,29 @@ export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
AccountModal: typeof import('./src/components/accountModal.vue')['default']
|
||||
AddInquiryConfigModal: typeof import('./src/components/addInquiryConfigModal.vue')['default']
|
||||
AddSysconfigModal: typeof import('./src/components/addSysconfigModal.vue')['default']
|
||||
ChatRecord: typeof import('./src/components/chatRecord.vue')['default']
|
||||
ConfirmModal: typeof import('./src/components/confirmModal.vue')['default']
|
||||
DeleteModal: typeof import('./src/components/DeleteModal.vue')['default']
|
||||
DoctorModal: typeof import('./src/components/doctorModal.vue')['default']
|
||||
FamilyModal: typeof import('./src/components/familyModal.vue')['default']
|
||||
InquiryDetailModal: typeof import('./src/components/inquiryDetailModal.vue')['default']
|
||||
InquiryDetailMoneyModal: typeof import('./src/components/inquiryDetailMoneyModal.vue')['default']
|
||||
IsOkModal: typeof import('./src/components/isOkModal.vue')['default']
|
||||
Loading: typeof import('./src/components/loading/loading.vue')['default']
|
||||
MedinceDetailModal: typeof import('./src/components/medinceDetailModal.vue')['default']
|
||||
MedinceModal: typeof import('./src/components/medinceModal.vue')['default']
|
||||
NumberModal: typeof import('./src/components/numberModal.vue')['default']
|
||||
PatientModal: typeof import('./src/components/patientModal.vue')['default']
|
||||
Prescription: typeof import('./src/components/prescription.vue')['default']
|
||||
PrescriptionModal: typeof import('./src/components/prescriptionModal.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SysmedinceDetailModal: typeof import('./src/components/sysmedinceDetailModal.vue')['default']
|
||||
TableUnit: typeof import('./src/components/tableUnit.vue')['default']
|
||||
Upload: typeof import('./src/components/upload.vue')['default']
|
||||
WithdrawalModal: typeof import('./src/components/withdrawalModal.vue')['default']
|
||||
}
|
||||
}
|
||||
|
||||
58
src/api/medince/list.js
Normal file
58
src/api/medince/list.js
Normal file
@ -0,0 +1,58 @@
|
||||
import request from '../../utils/request'
|
||||
const url = '/admin/product/platform';
|
||||
export function getMedinceList(params){//获取药品列表-分页-平台
|
||||
return request({
|
||||
url:'/admin/product/platform',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
};
|
||||
|
||||
export function getMedinceDetail(id){//商品详情-平台
|
||||
return request({
|
||||
url:`${url}/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
};
|
||||
export function getSysMedinceList(params){//获取商品列表-分页-系统
|
||||
return request({
|
||||
url:'/admin/product',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
};
|
||||
|
||||
export function getSysMedinceDetail(id){//商品详情-系统
|
||||
return request({
|
||||
url:`/admin/product/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
};
|
||||
export function addSysMedince(data){//新增商品-系统
|
||||
return request({
|
||||
url:`/admin/product`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
};
|
||||
export function editSysMedince(id,data){//修改商品-系统
|
||||
return request({
|
||||
url:`/admin/product/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function editMedinceStatus(id,data){//修改商品状态(上/下架)
|
||||
return request({
|
||||
url:`/admin/product/status/${id}`,
|
||||
method: 'put',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
export function getList(){//获取商品列表-平台
|
||||
return request({
|
||||
url:`/admin/product/platform/list`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
192
src/components/medinceDetailModal.vue
Normal file
192
src/components/medinceDetailModal.vue
Normal file
@ -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>
|
||||
367
src/components/sysmedinceDetailModal.vue
Normal file
367
src/components/sysmedinceDetailModal.vue
Normal file
@ -0,0 +1,367 @@
|
||||
<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" :disabled="modalSatus=='detail'">
|
||||
<a-row :gutter="24" style="margin-top: 35px;">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="药品名称:">
|
||||
<a-select :style="{width:'300px'}" allow-search placeholder="请选择药品名称" v-model="modalForm.product_name"
|
||||
:loading="loading" @change="changeMedince" @search="handList" :disabled="modalSatus=='edit'">
|
||||
<a-option size="large" style="max-width:400px" v-for="item in medinceList" :key="item.product_platform_id"
|
||||
:value="item.product_platform_id" :label="item.product_name">
|
||||
{{item.product_name }}
|
||||
</a-option>
|
||||
</a-select>
|
||||
|
||||
</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===0 ">{{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-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="product_type" label="药品类型:">
|
||||
<a-select :style="{width:'200px'}" v-model="modalForm.product_type" placeholder="请选择药品类型">
|
||||
<a-option :value="0">未知</a-option>
|
||||
<a-option :value="1" >中成药</a-option>
|
||||
<a-option :value="2">西药</a-option>
|
||||
</a-select>
|
||||
</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="common_name" label="药品通用名称:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.common_name" 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="product_price" label="药品价格(元):">
|
||||
<a-input-number :style="{ width: '200px' }" v-model="modalForm.product_price" :min="0" 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="license_number" label="批准文号:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.license_number" 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="product_platform_code" label="处方平台编码:">
|
||||
<a-input :style="{ width: '200px' }" v-model="modalForm.product_platform_code" 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 />
|
||||
<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-textarea :auto-size="{minRows:2}" allow-clear
|
||||
v-model="modalForm.product_remarks"
|
||||
placeholder="请填写药品备注" :style="{ width: '400px' }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
</a-form>
|
||||
<div class="titlebox" v-if="modalSatus!='detail'">
|
||||
<div class="bar"></div>
|
||||
<div class="name">操作</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;" v-if="modalSatus!='detail'">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space >
|
||||
<a-button type="primary" v-has="'admin:sysMedinceList:onshelf'" @click="handAdd" v-if="modalSatus=='add'">上架</a-button>
|
||||
<a-button type="primary" v-has="'admin:sysMedinceList:save'" @click="handEdit" v-else>保存</a-button>
|
||||
<a-button type="primary" status="success" v-has="'admin:sysMedinceList:onshelfAgain'" @click="handleEditStatus(1)" v-if="modalForm.product_status==2 && modalSatus=='edit'">重新上架</a-button>
|
||||
<a-button type="primary" v-has="'admin:sysMedinceList:offshelf'" status="warning" @click="handleEditStatus(2)" v-if="modalSatus=='edit' && modalForm.product_status==1">下架</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref,toRefs} from 'vue';
|
||||
import {addSysMedince,editSysMedince,editMedinceStatus,getList,getMedinceDetail} from "@/api/medince/list";
|
||||
import {formatProductType} from "@/utils/format"
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
modalTitle:{
|
||||
type: String,
|
||||
},
|
||||
modalSatus:{
|
||||
type: String
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
const medinceList=ref([]);
|
||||
const loading = ref(false);
|
||||
const rules={
|
||||
product_platform_id: [{ required: true, message: '请输入药品名称' }],
|
||||
product_price: [{ required: true, message: '请输入药品价格' }],
|
||||
product_platform_code: [{ required: true, message: '请输入处方平台编码' }],
|
||||
license_number: [{ required: true, message: '请输入批准文号' }],
|
||||
product_type: [{ required: true, message: '请选择药品类型' }],
|
||||
common_name: [{ required: true, message: '请输入通用名称' }],
|
||||
product_remarks: [{ 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','freshList']);
|
||||
const {modalVisible,modalForm,modalSatus} = toRefs(props);
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('familyVisibleChange', false);
|
||||
};
|
||||
const handAdd=async()=>{
|
||||
delete modalForm.value.avatar;
|
||||
delete modalForm.value.product_id
|
||||
modalForm.value.product_status=1;
|
||||
const {code}=await addSysMedince(modalForm.value);
|
||||
if(code==200){
|
||||
Message.success("添加成功");
|
||||
handleClose(true);
|
||||
emits('freshList');
|
||||
}
|
||||
}
|
||||
const handEdit=async()=>{
|
||||
const {code}=await editSysMedince(modalForm.value.product_id,modalForm.value);
|
||||
if(code==200){
|
||||
Message.success("修改成功");
|
||||
handleClose(true);
|
||||
emits('freshList');
|
||||
}
|
||||
|
||||
};
|
||||
const handleEditStatus=async(status)=>{
|
||||
const {code}=await editMedinceStatus(modalForm.value.product_id,{
|
||||
product_status: status
|
||||
});
|
||||
if(code==200){
|
||||
status==1?Message.success("上架成功"):Message.success("下架成功");
|
||||
handleClose(true);
|
||||
emits('freshList');
|
||||
}
|
||||
}
|
||||
//详情
|
||||
const handleDetail = async (product_platform_id) => {
|
||||
const { code, data, message } = await getMedinceDetail(product_platform_id);
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
modalForm.value.stock=data.stock;
|
||||
}
|
||||
};
|
||||
const handList= async(value)=>{
|
||||
loading.value=true;
|
||||
const {code,data}=await getList({
|
||||
product_name: value,
|
||||
});
|
||||
loading.value=false;
|
||||
if(code==200){
|
||||
medinceList.value=data;
|
||||
}
|
||||
}
|
||||
const changeMedince = (value) => {
|
||||
let arr = medinceList.value.filter((item) => item.product_platform_id == value);
|
||||
modalForm.value.product_platform_id = arr[0].product_platform_id;
|
||||
console.log(arr[0]);
|
||||
modalForm.value.product_spec=arr[0].product_spec;
|
||||
modalForm.value.product_pharmacy_code=arr[0].product_pharmacy_code;
|
||||
modalForm.value.manufacturer=arr[0].manufacturer;
|
||||
handleDetail(arr[0].product_platform_id)
|
||||
}
|
||||
</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>
|
||||
@ -117,4 +117,22 @@ export const formatRelation=(val)=>{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const formatProductType=(val)=>{
|
||||
//0:'未知',2:'中成药', 3:'西药'
|
||||
let data={0:'未知',1:'中成药', 2:'西药'}
|
||||
if(val || val==0){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
export const formatProductStatus=(val)=>{
|
||||
//0:'未知',2:'中成药', 3:'西药'
|
||||
let data={1:'正常', 2:'下架'}
|
||||
if(val){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
@ -939,7 +939,7 @@ const showCheckedAll=ref(true);
|
||||
cb("请上传医师资格证")
|
||||
}
|
||||
if (qualification_cert_list.value.length < 2) {
|
||||
cb("医师资格证最少上传两张")
|
||||
cb("至少上传2张医师资格证")
|
||||
}
|
||||
resolve()
|
||||
}, 1000)
|
||||
|
||||
355
src/views/medince/platform-medince/index.vue
Normal file
355
src/views/medince/platform-medince/index.vue
Normal file
@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="product_name" label="药品名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_name" placeholder="请输入药品名称或通用名" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_pharmacy_code" label="药店编码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_pharmacy_code" placeholder="请输入药品编码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="manufacturer" label="生产企业">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.manufacturer" placeholder="请输入生产企业" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="license_number" label="批准文号">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.license_number" placeholder="请输入批准文号" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_platform_code" label="处方编码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_platform_code
|
||||
" placeholder="请输入处方平台编码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_type" label="药品类型">
|
||||
<a-select v-model="queryForm.product_type" placeholder="请选择药品类型" :style="{ width: '182px' }">
|
||||
<a-option :value="0">未知</a-option>
|
||||
<a-option :value="1">中成药</a-option>
|
||||
<a-option :value="2">西药</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
|
||||
<!-- action -->
|
||||
<!-- <div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:platformMedinceList:selectExport'" type="primary" @click="handlExport(2)"><icon-export /> 选择数据导出 </a-button>
|
||||
<a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button>
|
||||
</a-space>
|
||||
</div> -->
|
||||
|
||||
<!-- table -->
|
||||
<a-table :columns="columns" :data="tableData"
|
||||
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
||||
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||
row-key="family_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
||||
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
||||
<template #doctor_id="{record,rowIndex}">
|
||||
<div>{{(rowIndex+1)+(pager.page-1)*pager.page_size}}</div>
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:platformMedinceList:detail'" type="text"
|
||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||
修改</a-button> -->
|
||||
<!-- <a-button v-has="'admin:platformMedinceList:remove'" type="text"
|
||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<medinceDetailModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></medinceDetailModal>
|
||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
||||
@cancel="()=>okVisible=false">
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<div>确定保存当前信息?</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getMedinceList,getMedinceDetail} from '@/api/medince/list';
|
||||
import { downloadFile } from '@/utils/downloadFile';
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getMedinceInfo(pager);
|
||||
}
|
||||
});
|
||||
|
||||
const file = ref();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
|
||||
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
});
|
||||
const modalForm = reactive({
|
||||
user:{},
|
||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||
|
||||
});
|
||||
watch(() => queryForm.create_range_time,
|
||||
(value) => {
|
||||
if (value) {
|
||||
let [startTime, endTime] = value;
|
||||
queryForm.created_at = startTime + '&' + endTime;
|
||||
} else {
|
||||
queryForm.created_at = '';
|
||||
}
|
||||
}
|
||||
);
|
||||
// Modal
|
||||
const modalVisible = ref(false);
|
||||
const modalTitle = ref('默认标题');
|
||||
|
||||
// Batch Del List
|
||||
let batchList = [];
|
||||
|
||||
// Table Columns
|
||||
const columns = [
|
||||
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||
{ title: '药品名称', dataIndex: 'product_name',width:200 },
|
||||
{ title: '规格', dataIndex: 'product_spec',width:200 },
|
||||
{ title: '单价(元)', dataIndex: 'product_price', slotName: 'product_price',width: 150 },
|
||||
{ title: '批准文号', dataIndex: 'license_number',width:200 },
|
||||
{ title: '生产厂家', dataIndex: 'manufacturer',width:200 },
|
||||
{ title: '药店编码', dataIndex: 'product_pharmacy_code',width:100 },
|
||||
// { title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
//弹框状态
|
||||
const modalSatus = ref('add');
|
||||
|
||||
// 新增Satus
|
||||
const handleAdd = () => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '新增患者';
|
||||
modalSatus.value = 'add';
|
||||
modalForm.patient_id = null;
|
||||
};
|
||||
|
||||
//详情
|
||||
const handleDetail = async (record) => {
|
||||
const { code, data, message } = await getMedinceDetail(record.product_platform_id
|
||||
);
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
modalVisible.value = true;
|
||||
}
|
||||
};
|
||||
// 批量删除
|
||||
const handleBatchDelete = () => {
|
||||
if (batchList.length !== 0) {
|
||||
proxy.$modal.warning({
|
||||
title: '提示',
|
||||
content: '是否批量删除以下选中的数据?',
|
||||
hideCancel: false,
|
||||
onOk: async () => {
|
||||
const res = await removeFamily({ ids: batchList });
|
||||
proxy.$message.success(res.message);
|
||||
getMedinceInfo(pager);
|
||||
},
|
||||
onCancel: () => {
|
||||
proxy.$message.info('已取消批量删除数据');
|
||||
},
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error('请勾选需要删除的数据!');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
*/
|
||||
const handlePageChange = (page) => {
|
||||
pager.page = page;
|
||||
|
||||
// 修改当前页码
|
||||
currentPage.value = page;
|
||||
getMedinceInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 每页数据量
|
||||
const handlepage_sizeChange = (page_size) => {
|
||||
pager.page_size = page_size;
|
||||
getMedinceInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 获取患者信息
|
||||
const getMedinceInfo = async (params = {}) => {
|
||||
const { data, code, message } = await getMedinceList(params);
|
||||
if (code == 200) {
|
||||
tableData.value = data.data;
|
||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||
}
|
||||
};
|
||||
|
||||
// 查询患者信息
|
||||
const handleQuery = async () => {
|
||||
pager.page = 1;
|
||||
const params = {
|
||||
page: pager.page,
|
||||
page_size: pager.page_size,
|
||||
...queryForm,
|
||||
};
|
||||
|
||||
getMedinceInfo(params);
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
getMedinceInfo(queryForm);
|
||||
}
|
||||
const handlExport=async(type)=>{
|
||||
proxy.$loading.show();
|
||||
let fromData=null;
|
||||
if(type==1){
|
||||
fromData={
|
||||
type,
|
||||
...queryForm
|
||||
}
|
||||
}else if(type==2){
|
||||
if(deleteData.value.length==0){
|
||||
proxy.$message.warning('请勾选数据');
|
||||
proxy.$loading.hide();
|
||||
return false;
|
||||
};
|
||||
let id='';
|
||||
deleteData.value.forEach((item)=>{
|
||||
if(id){
|
||||
id+=","+item
|
||||
}else{
|
||||
id=item;
|
||||
}
|
||||
})
|
||||
fromData={
|
||||
type,
|
||||
id
|
||||
}
|
||||
}else if(type==3){
|
||||
fromData={
|
||||
type
|
||||
}
|
||||
}
|
||||
const {code,data}=await exportFamily(fromData);
|
||||
if(code==200){
|
||||
downloadFile(data,'就诊人列表');
|
||||
}
|
||||
proxy.$loading.hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getMedinceInfo(pager);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.action {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.okmodal div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hospital_name {
|
||||
width: 140px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.headImg {
|
||||
margin-right: 20px;
|
||||
border-radius: 50%;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.cell{
|
||||
.arco-form-item{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cert .arco-form-item-label-col {
|
||||
flex: 0 0 8px !important;
|
||||
}
|
||||
|
||||
.red {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;
|
||||
color: red;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.cardNum {
|
||||
width: 148px;
|
||||
}
|
||||
.codbox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.reason{
|
||||
width:250px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
409
src/views/medince/sys-medince/index.vue
Normal file
409
src/views/medince/sys-medince/index.vue
Normal file
@ -0,0 +1,409 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="product_name" label="药品名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_name" placeholder="请输入药品名称" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="common_name" label="通用名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.common_name" placeholder="请输入药品通用名称" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="mnemonic_code" label="助记编码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mnemonic_code" placeholder="请输入药品助记码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item field="product_pharmacy_code" label="药店编码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_pharmacy_code" placeholder="请输入药品编码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="manufacturer" label="生产企业">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.manufacturer" placeholder="请输入生产企业" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="license_number" label="批准文号">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.license_number" placeholder="请输入批准文号" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_platform_code" label="处方编码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_platform_code
|
||||
" placeholder="请输入处方平台编码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_platform_id" label="平台药品id">
|
||||
<a-input :style="{ width: '170px' }" v-model="queryForm.product_platform_id
|
||||
" placeholder="请输入平台药品id" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_remarks" label="药品备注">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.product_remarks
|
||||
" placeholder="请输入药品备注" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="product_type" label="药品类型">
|
||||
<a-select v-model="queryForm.product_type" placeholder="请选择药品类型" :style="{ width: '182px' }">
|
||||
<a-option :value="0">未知</a-option>
|
||||
<a-option :value="1">中成药</a-option>
|
||||
<a-option :value="2">西药</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysMedinceList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||
<!-- <a-button v-has="'admin:sysMedinceList:remove'" type="primary" status="danger" @click="handleAdd"><icon-delete /> 删除 </a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:selectExport'" type="primary" @click="handlExport(2)"><icon-export /> 选择数据导出 </a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
<!-- table -->
|
||||
<a-table :columns="columns" :data="tableData"
|
||||
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
||||
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||
row-key="product_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
||||
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
||||
<template #doctor_id="{record,rowIndex}">
|
||||
<div>{{(rowIndex+1)+(pager.page-1)*pager.page_size}}</div>
|
||||
</template>
|
||||
<template #product_status="{record}">
|
||||
<a-tag v-if="record.product_status == 1" color="green">{{formatProductStatus(record.product_status)}}</a-tag>
|
||||
<a-tag v-else-if="record.product_status == 2" color="red">{{formatProductStatus(record.product_status)}}</a-tag>
|
||||
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysMedinceList:detail'" type="text"
|
||||
@click="handleDetail(record,'detail')"><icon-book />详情</a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:edit'" type="text"
|
||||
@click="handleDetail(record,'edit')"><icon-edit />修改</a-button>
|
||||
<!-- <a-button v-has="'admin:sysMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||
修改</a-button> -->
|
||||
<!-- <a-button v-has="'admin:sysMedinceList:remove'" type="text"
|
||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<sysmedinceDetailModal :modalVisible="modalVisible" :modalForm="modalForm" @freshList="getMedinceInfo({ ...pager, ...queryForm })" :modalSatus="modalSatus" @familyVisibleChange="familyVisibleChange" :modalTitle="modalTitle"></sysmedinceDetailModal>
|
||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
||||
@cancel="()=>okVisible=false">
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<div>确定保存当前信息?</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getSysMedinceList,getSysMedinceDetail} from '@/api/medince/list';
|
||||
import { downloadFile } from '@/utils/downloadFile';
|
||||
import {formatProductStatus} from '@/utils/format';
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getMedinceInfo(pager);
|
||||
}
|
||||
});
|
||||
|
||||
const file = ref();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
|
||||
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
});
|
||||
const modalForm = reactive({
|
||||
user:{},
|
||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||
|
||||
});
|
||||
watch(() => queryForm.create_range_time,
|
||||
(value) => {
|
||||
if (value) {
|
||||
let [startTime, endTime] = value;
|
||||
queryForm.created_at = startTime + '&' + endTime;
|
||||
} else {
|
||||
queryForm.created_at = '';
|
||||
}
|
||||
}
|
||||
);
|
||||
// Modal
|
||||
const modalVisible = ref(false);
|
||||
const modalTitle = ref('默认标题');
|
||||
|
||||
// Batch Del List
|
||||
let batchList = [];
|
||||
|
||||
// Table Columns
|
||||
const columns = [
|
||||
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||
{ title: '药品名称', dataIndex: 'product_name',width:200 },
|
||||
{ title: '通用名称', dataIndex: 'common_name',width:200 },
|
||||
{ title: '规格', dataIndex: 'product_spec',width:200 },
|
||||
{ title: '单价(元)', dataIndex: 'product_price', slotName: 'product_price',width: 150 },
|
||||
{ title: '批准文号', dataIndex: 'license_number',width:200 },
|
||||
{ title: '生产厂家', dataIndex: 'manufacturer',width:200 },
|
||||
{ title: '药店编码', dataIndex: 'product_pharmacy_code',width:100 },
|
||||
{ title: '库存', dataIndex: 'stock',width:100 },
|
||||
{ title: '购买上限', dataIndex: 'prescription_num',width:100 },
|
||||
{ title: '状态', dataIndex: 'product_status',slotName:'product_status',width:100 },
|
||||
// { title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
//弹框状态
|
||||
const modalSatus = ref('add');
|
||||
|
||||
// 新增Satus
|
||||
const handleAdd = () => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '新增药品';
|
||||
modalSatus.value = 'add';
|
||||
modalForm.product_id ='';
|
||||
modalForm.frequency_use =null;
|
||||
modalForm.available_days =null;
|
||||
modalForm.product_name ='';
|
||||
modalForm.common_name ='';
|
||||
modalForm.product_spec ='';
|
||||
modalForm.product_price =null;
|
||||
modalForm.license_number ='';
|
||||
modalForm.manufacturer ='';
|
||||
modalForm.product_pharmacy_code ='';
|
||||
modalForm.product_platform_code ='';
|
||||
modalForm.stock ='';
|
||||
modalForm.prescription_num =null;
|
||||
modalForm.single_unit ='';
|
||||
modalForm.single_use ='';
|
||||
modalForm.packaging_unit ='';
|
||||
modalForm.product_status ='';
|
||||
modalForm.product_type='';
|
||||
};
|
||||
|
||||
//详情
|
||||
const handleDetail = async (record,type) => {
|
||||
const { code, data, message } = await getSysMedinceDetail(record.product_id);
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
if(type=="edit"){
|
||||
modalSatus.value = 'edit';
|
||||
modalTitle.value = '修改药品';
|
||||
}else{
|
||||
modalSatus.value = 'detail';
|
||||
modalTitle.value = '药品详情';
|
||||
}
|
||||
modalVisible.value = true;
|
||||
|
||||
}
|
||||
};
|
||||
// 批量删除
|
||||
const handleBatchDelete = () => {
|
||||
if (batchList.length !== 0) {
|
||||
proxy.$modal.warning({
|
||||
title: '提示',
|
||||
content: '是否批量删除以下选中的数据?',
|
||||
hideCancel: false,
|
||||
onOk: async () => {
|
||||
const res = await removeFamily({ ids: batchList });
|
||||
proxy.$message.success(res.message);
|
||||
getMedinceInfo(pager);
|
||||
},
|
||||
onCancel: () => {
|
||||
proxy.$message.info('已取消批量删除数据');
|
||||
},
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error('请勾选需要删除的数据!');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
*/
|
||||
const handlePageChange = (page) => {
|
||||
pager.page = page;
|
||||
|
||||
// 修改当前页码
|
||||
currentPage.value = page;
|
||||
getMedinceInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 每页数据量
|
||||
const handlepage_sizeChange = (page_size) => {
|
||||
pager.page_size = page_size;
|
||||
getMedinceInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 获取患者信息
|
||||
const getMedinceInfo = async (params = {}) => {
|
||||
const { data, code, message } = await getSysMedinceList(params);
|
||||
if (code == 200) {
|
||||
tableData.value = data.data;
|
||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||
}
|
||||
};
|
||||
|
||||
// 查询患者信息
|
||||
const handleQuery = async () => {
|
||||
pager.page = 1;
|
||||
const params = {
|
||||
page: pager.page,
|
||||
page_size: pager.page_size,
|
||||
...queryForm,
|
||||
};
|
||||
|
||||
getMedinceInfo(params);
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
getMedinceInfo(queryForm);
|
||||
}
|
||||
const familyVisibleChange=(data)=>{
|
||||
modalVisible.value=false;
|
||||
}
|
||||
const handlExport=async(type)=>{
|
||||
proxy.$loading.show();
|
||||
let fromData=null;
|
||||
if(type==1){
|
||||
fromData={
|
||||
type,
|
||||
...queryForm
|
||||
}
|
||||
}else if(type==2){
|
||||
if(deleteData.value.length==0){
|
||||
proxy.$message.warning('请勾选数据');
|
||||
proxy.$loading.hide();
|
||||
return false;
|
||||
};
|
||||
let id='';
|
||||
deleteData.value.forEach((item)=>{
|
||||
if(id){
|
||||
id+=","+item
|
||||
}else{
|
||||
id=item;
|
||||
}
|
||||
})
|
||||
fromData={
|
||||
type,
|
||||
id
|
||||
}
|
||||
}else if(type==3){
|
||||
fromData={
|
||||
type
|
||||
}
|
||||
}
|
||||
const {code,data}=await exportFamily(fromData);
|
||||
if(code==200){
|
||||
downloadFile(data,'就诊人列表');
|
||||
}
|
||||
proxy.$loading.hide();
|
||||
}
|
||||
onMounted(() => {
|
||||
getMedinceInfo(pager);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.action {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.okmodal div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hospital_name {
|
||||
width: 140px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.headImg {
|
||||
margin-right: 20px;
|
||||
border-radius: 50%;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.cell{
|
||||
.arco-form-item{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cert .arco-form-item-label-col {
|
||||
flex: 0 0 8px !important;
|
||||
}
|
||||
|
||||
.red {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;
|
||||
color: red;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.cardNum {
|
||||
width: 148px;
|
||||
}
|
||||
.codbox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.reason{
|
||||
width:250px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user