增加作废和分检功能
This commit is contained in:
parent
c825a118a4
commit
377ea7fb2b
@ -27,6 +27,13 @@ export interface ApplyformVO {
|
||||
departmentCode:string //执行科室代码
|
||||
}
|
||||
|
||||
//分检操作使用
|
||||
export interface UPFJApplyformVO {
|
||||
|
||||
id: string // 主键
|
||||
device: string // 设备内容
|
||||
}
|
||||
|
||||
// 申请登记记录 API
|
||||
export const ApplyformApi = {
|
||||
// 查询申请登记记录分页
|
||||
@ -58,4 +65,25 @@ export const ApplyformApi = {
|
||||
exportApplyform: async (params) => {
|
||||
return await request.download({ url: `/applyregistration/applyform/export-excel`, params })
|
||||
},
|
||||
|
||||
// 获取设备表记录
|
||||
getDevicelist: async (orgId: string) => {
|
||||
return await request.get({ url: `/applyregistration/applyform/getdevice?orgId=` + orgId })
|
||||
},
|
||||
|
||||
// 更新分检相关内容
|
||||
updateFJApplyform: async (data:UPFJApplyformVO) => {
|
||||
return await request.post({ url: `/applyregistration/applyform/updateapplyform`,data })
|
||||
},
|
||||
|
||||
// 删除申请登记记录
|
||||
cancelApplyform: async (id: number) => {
|
||||
return await request.delete({ url: `/applyregistration/applyform/cancel?id=` + id })
|
||||
},
|
||||
|
||||
// 获取执行科室列表
|
||||
getapplfmDeptlist: async (orgId: string) => {
|
||||
return await request.get({ url: `/applyregistration/applyform/applfmdeptlist?orgId=` + orgId })
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -61,6 +61,6 @@ export const PatientexamlistApi = {
|
||||
|
||||
|
||||
getuporghiid: async (id: number,orgId:String) => {
|
||||
return await request.download({ url: `/tblist/patientexamlist/UPDATEHigOrg?id=${id}&&orgId=${orgId}` })
|
||||
return await request.get({ url: `/tblist/patientexamlist/UPDATEHigOrg?id=${id}&&orgId=${orgId}` })
|
||||
},
|
||||
}
|
||||
|
@ -2,99 +2,25 @@
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:model=formData
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
|
||||
|
||||
<el-form-item label="登记单号" prop="regId">
|
||||
<el-input v-model="formData.regId" placeholder="请输入登记单号" />
|
||||
<el-form-item label="当前患者" >
|
||||
<el-input v-model="name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记来源" prop="regSource">
|
||||
<el-input v-model="formData.regSource" placeholder="请输入登记来源" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查ID" prop="examId">
|
||||
<el-input v-model="formData.examId" placeholder="请输入检查ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="患者姓名" prop="pName">
|
||||
<el-input v-model="formData.pName" placeholder="请输入患者姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-input v-model="formData.gender" placeholder="请输入性别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出生日期" prop="birthday">
|
||||
<el-date-picker
|
||||
v-model="formData.birthday"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择出生日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查日期" prop="examDate">
|
||||
<el-date-picker
|
||||
v-model="formData.examDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择检查日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查项目名称" prop="examItemName">
|
||||
<el-input v-model="formData.examItemName" placeholder="请输入检查项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查设备ID" prop="deviceId">
|
||||
<el-input v-model="formData.deviceId" placeholder="请输入检查设备ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查设备名称" prop="deviceName">
|
||||
<el-input v-model="formData.deviceName" placeholder="请输入检查设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="患者联系电话" prop="contactTel">
|
||||
<el-input v-model="formData.contactTel" placeholder="请输入患者联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记时间" prop="regDate">
|
||||
<el-date-picker
|
||||
v-model="formData.regDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择登记时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分检时间" prop="sortDate">
|
||||
<el-date-picker
|
||||
v-model="formData.sortDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择分检时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开单医生" prop="billgDoctor">
|
||||
<el-input v-model="formData.billgDoctor" placeholder="请输入开单医生" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查状态" prop="examStatus">
|
||||
<el-radio-group v-model="formData.examStatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="开单医生科室" prop="billDoctorDepartment">
|
||||
<el-input v-model="formData.billDoctorDepartment" placeholder="请输入开单医生科室" />
|
||||
</el-form-item>
|
||||
<el-form-item label="此条记录的创建时间" prop="createDate">
|
||||
<el-date-picker
|
||||
v-model="formData.createDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择此条记录的创建时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查项目代码" prop="examItemCode">
|
||||
<el-input v-model="formData.examItemCode" placeholder="请输入检查项目代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机构ID" prop="orgId">
|
||||
<el-input v-model="formData.orgId" placeholder="请输入机构ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分检医生" prop="sortDoctor">
|
||||
<el-input v-model="formData.sortDoctor" placeholder="请输入分检医生" />
|
||||
|
||||
<el-form-item label="分诊设备" >
|
||||
<el-select
|
||||
v-model="fordevicemValue"
|
||||
placeholder="请选择分诊设备"
|
||||
clearable
|
||||
class="!w-300px"
|
||||
>
|
||||
<el-option v-for="item in fordevicemData" :key="item.deviceId" :label="item.deviceName" :value="item.deviceName+'|'+item.deviceId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@ -104,14 +30,14 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ApplyformApi, ApplyformVO } from '@/api/applyregistration/applyform'
|
||||
import { ApplyformApi, ApplyformVO,UPFJApplyformVO } from '@/api/applyregistration/applyform'
|
||||
|
||||
/** 申请登记记录 表单 */
|
||||
defineOptions({ name: 'ApplyformForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const upFJApplyformVO = ref<UPFJApplyformVO[]>([]);
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
@ -121,7 +47,7 @@ const formData = ref({
|
||||
regId: undefined,
|
||||
regSource: undefined,
|
||||
examId: undefined,
|
||||
pName: undefined,
|
||||
pname: undefined,
|
||||
gender: undefined,
|
||||
birthday: undefined,
|
||||
examDate: undefined,
|
||||
@ -139,21 +65,45 @@ const formData = ref({
|
||||
orgId: undefined,
|
||||
sortDoctor: undefined,
|
||||
})
|
||||
|
||||
//设备列表
|
||||
/* const fordevicemData = ref({
|
||||
ID: undefined,
|
||||
deviceName: undefined,
|
||||
deviceId: undefined,
|
||||
deviceDepartment: undefined,
|
||||
departmentCode: undefined,
|
||||
orgId: undefined,
|
||||
deviceModel: undefined,
|
||||
deviceMaker: undefined,
|
||||
deviceType: undefined,
|
||||
deviceStatus: undefined,
|
||||
createDate: undefined,
|
||||
}) */
|
||||
|
||||
const fordevicemValue = ref('')
|
||||
const name = ref('')
|
||||
let ID:number=0
|
||||
const fordevicemData = ref<any[]>([])
|
||||
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
const open = async (type: string, orgId: string,pname:string,id:number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
name.value=pname
|
||||
ID=id
|
||||
console.log("ID:"+id)
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
if (orgId) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await ApplyformApi.getApplyform(id)
|
||||
fordevicemData.value = await ApplyformApi.getDevicelist(orgId)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@ -164,52 +114,38 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
|
||||
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as ApplyformVO
|
||||
if (formType.value === 'create') {
|
||||
await ApplyformApi.createApplyform(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await ApplyformApi.updateApplyform(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
if(!fordevicemValue.value)
|
||||
{
|
||||
await message.alert("请选择分检设备")
|
||||
}
|
||||
else
|
||||
{
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
|
||||
await ApplyformApi.updateFJApplyform({ id: ID.toString(), device:fordevicemValue.value.toString() })
|
||||
message.success("分检成功")
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
regId: undefined,
|
||||
regSource: undefined,
|
||||
examId: undefined,
|
||||
pName: undefined,
|
||||
gender: undefined,
|
||||
birthday: undefined,
|
||||
examDate: undefined,
|
||||
examItemName: undefined,
|
||||
deviceId: undefined,
|
||||
deviceName: undefined,
|
||||
contactTel: undefined,
|
||||
regDate: undefined,
|
||||
sortDate: undefined,
|
||||
billgDoctor: undefined,
|
||||
examStatus: undefined,
|
||||
billDoctorDepartment: undefined,
|
||||
createDate: undefined,
|
||||
examItemCode: undefined,
|
||||
orgId: undefined,
|
||||
sortDoctor: undefined,
|
||||
}
|
||||
fordevicemData.value =[]
|
||||
fordevicemValue.value=''
|
||||
upFJApplyformVO.value=[]
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -129,7 +129,7 @@
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
@ -137,7 +137,7 @@
|
||||
v-if="false"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@ -222,7 +222,7 @@
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
@click="openForm('update', scope.row.pname,scope.row.orgId,scope.row.id,scope.row.examStatus)"
|
||||
v-hasPermi="['applyregistration:applyform:update']"
|
||||
>
|
||||
分检
|
||||
@ -330,18 +330,26 @@ const resetQuery = () => {
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
const openForm = (type: string,pname:string ,orgid: string,ID:number,status:string) => {
|
||||
if(status=="未分检")
|
||||
{
|
||||
formRef.value.open(type, orgid,pname,ID)
|
||||
}
|
||||
else
|
||||
{
|
||||
message.warning("只有未分检才可以进行分检操作")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
/** 作废按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
await message.delConfirm("是否作废选择内容")
|
||||
// 发起删除
|
||||
await ApplyformApi.deleteApplyform(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
await ApplyformApi.cancelApplyform(id)
|
||||
message.success("作废成功")
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
|
Loading…
Reference in New Issue
Block a user