新增返修申请界面相关
This commit is contained in:
parent
1e42207fca
commit
a33f2f693a
@ -1,14 +1,37 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/*
|
||||
* 李传洋
|
||||
* ProcessManageApi
|
||||
*/
|
||||
export interface ProcessManageVO {
|
||||
id: string // 主键
|
||||
orgId: string // 机构ID
|
||||
examId: string // 检查ID,一人多个检查的检查id
|
||||
regId: string // 登记ID :patientid
|
||||
processOrgId: string // 审核机构id
|
||||
processorgName: string // 审核机构名称
|
||||
processDoctor: string // 审核医生
|
||||
processDate: Date // 审核时间
|
||||
processContent: string // 申请原因
|
||||
applyDoctor: string // 申请医生
|
||||
applyDateTime: string // 申请时间
|
||||
processstats: number // 审核状态 0申请 1审核 2拒绝
|
||||
pname: string // 姓名
|
||||
remark?: string // 备注
|
||||
refuseremark?: string // 拒绝原因
|
||||
}
|
||||
|
||||
export const ProcessManageApi = {
|
||||
getPage: async (params: any) => {
|
||||
return await request.get({ url: `/system/process/page`, params })
|
||||
},
|
||||
get: async (id: any) => {
|
||||
return await request.get({ url: `/system/process/get?id=` + id })
|
||||
}
|
||||
},
|
||||
create: async (data: ProcessManageVO) => {
|
||||
return await request.post({ url: `/system/process/save`, data })
|
||||
},
|
||||
update: async (data: ProcessManageVO) => {
|
||||
return await request.put({ url: `/system/process/update`, data })
|
||||
},
|
||||
delete: async (id: any) => {
|
||||
return await request.delete({ url: `/system/process/delete?id=` + id })
|
||||
},
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
<span style="margin-left: 10px"> {{ age + '岁' }}</span>
|
||||
<span style="margin-left: 10px"> 检查编号:{{ rowinfo.examId }}</span>
|
||||
<span style="margin-left: 10px">
|
||||
检查日期:{{ formatDate(rowinfo.examDate, 'YYYY-MM-DD HH:mm:ss') }}</span
|
||||
检查日期:{{ formatDate(rowinfo.examDate, 'YYYY-MM-DD') }}</span
|
||||
>
|
||||
<span style="margin-left: 10px">检查机构: {{ rowinfo.orgName }}</span>
|
||||
</div>
|
||||
@ -61,6 +61,9 @@
|
||||
<el-button type="primary" plain @click="print"
|
||||
><el-icon><Printer /></el-icon>打印</el-button
|
||||
>
|
||||
<el-button type="primary" plain @click="ECGApplyDialog"
|
||||
><el-icon><User /></el-icon>申请返修</el-button
|
||||
>
|
||||
<el-button type="primary" plain @click="openECGDialog" v-if="isshowwjz"
|
||||
><el-icon><Warning /></el-icon>危急值</el-button
|
||||
>
|
||||
@ -555,6 +558,7 @@
|
||||
<ECGWarningDialog ref="ECGDialog" />
|
||||
<ECGReport ref="ECGReportDialog" />
|
||||
<ECGCopmareDialog ref="ECGCompare" />
|
||||
<ECGApplyforRepair ref="ECGApply"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -575,7 +579,7 @@ import ECGWarningDialog from '@/views/ECG/ECGWaring/ECGWarningDialog.vue'
|
||||
import ECGReport from '@/views/ECG/ECGWaring/ECGReport.vue'
|
||||
import { WarningApi, WarningVO } from '@/api/system/warning'
|
||||
import ECGCopmareDialog from '@/views/ECG/ECGCompare.vue'
|
||||
|
||||
import ECGApplyforRepair from '@/views/ECG/ECGModify/ECGApplyforRepair.vue'
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const message = useMessage() // 消息弹窗
|
||||
@ -612,6 +616,7 @@ const isshowwjz = ref(false)
|
||||
const isshowysb = ref(false)
|
||||
const ECGReportDialog = ref() //危急值消息弹窗
|
||||
const ECGCompare = ref() //心电图对比弹窗
|
||||
const ECGApply = ref() //申请返修弹窗
|
||||
// 树配置项
|
||||
const treeDefaultProps = {
|
||||
children: 'children',
|
||||
@ -796,6 +801,10 @@ function print() {
|
||||
const handleUpdate = (newValue) => {
|
||||
correct.value = newValue
|
||||
}
|
||||
//申请返修界面弹窗
|
||||
function ECGApplyDialog() {
|
||||
ECGApply.value.opendiag('1',rowinfo.value,Profilevo.value.orgId,Profilevo.value.doctorname)
|
||||
}
|
||||
//危急值弹窗
|
||||
function openECGDialog() {
|
||||
ECGDialog.value.opendiag('1', rowinfo.value)
|
||||
|
229
src/views/ECG/ECGModify/ECGApplyforRepair.vue
Normal file
229
src/views/ECG/ECGModify/ECGApplyforRepair.vue
Normal file
@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="申请返修"
|
||||
width="720px"
|
||||
style="height: 490px"
|
||||
>
|
||||
<div class="ApplyforRepair">
|
||||
<!-- 患者基础信息 -->
|
||||
<div class="info-section">
|
||||
<div class="section-title"><span style="margin-left: 5px;" >患者基础信息</span></div>
|
||||
<el-form label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="检查日期:" label-width="80">
|
||||
<el-input
|
||||
style="width: 160px"
|
||||
:value="formatDate(rowinfo.examDate, 'YYYY-MM-DD')"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="姓名:" label-width="60">
|
||||
<el-input :value="rowinfo.pname" style="width: 100px" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="性别:" label-width="50">
|
||||
<el-input :value="rowinfo.gender" style="width: 100px" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="检查编号:">
|
||||
<el-input :value="rowinfo.examId" style="width: 140px" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form-item label="检查机构:" label-width="30">
|
||||
<el-input :value="rowinfo.orgName" style="width: 180px" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 申请返修信息 -->
|
||||
<div class="info-section">
|
||||
<div class="section-title"><span style="margin-left: 5px;">申请返修信息</span></div>
|
||||
<el-form label-width="100px" :model="formData" :rules="rules" ref="formRef">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请医生:" prop="applyDoctor">
|
||||
<el-input v-model="formData.applyDoctor" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请时间:" prop="applyDateTime">
|
||||
<el-date-picker
|
||||
v-model="formData.applyDateTime"
|
||||
type="datetime"
|
||||
placeholder="请选择申请时间"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="申请原因:" prop="processContent">
|
||||
<el-input
|
||||
v-model="formData.processContent"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
placeholder="请输入申请原因"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="save" :disabled="issaveshow">确认</el-button>
|
||||
<el-button @click="() => (dialogVisible = false)">取消</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { ProcessManageApi,ProcessManageVO } from '@/api/ECG/processManage'
|
||||
import { PatientexamlistApi } from '@/api/tblist/patientexamlist'
|
||||
const Profilevo = ref<ProfileVO>({} as ProfileVO) //当前登录人信息
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const issaveshow = ref(false)
|
||||
const rowinfo = ref() //当前患者数据行
|
||||
const formData = ref({
|
||||
id: '',
|
||||
orgId: '',
|
||||
examId: '',
|
||||
regId: '',
|
||||
processOrgId: '',
|
||||
processorgName: '',
|
||||
processDoctor: '',
|
||||
processDate: '',
|
||||
processContent: '',
|
||||
applyDoctor: '',
|
||||
applyDateTime: '',
|
||||
remark: '',
|
||||
processstats:'',
|
||||
refuseremark: '',
|
||||
pname: ''
|
||||
})
|
||||
const formRef = ref()
|
||||
const rules = {
|
||||
applyDateTime: [
|
||||
{ required: true, message: '请选择申请时间', trigger: 'change' }
|
||||
],
|
||||
processContent: [
|
||||
{ required: true, message: '请输入申请原因', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: '',
|
||||
orgId: '',
|
||||
examId: '',
|
||||
regId: '',
|
||||
processOrgId: '',
|
||||
processorgName: '',
|
||||
processDoctor: '',
|
||||
processDate: '',
|
||||
processContent: '',
|
||||
applyDoctor: '',
|
||||
applyDateTime: '',
|
||||
remark: '',
|
||||
processstats:'',
|
||||
refuseremark: '',
|
||||
pname: ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const opendiag = async (type: string, row: any, orgId: string, doctorname: string) => {
|
||||
resetForm()
|
||||
const data = await ProcessManageApi.getPage({
|
||||
examId: row.examId
|
||||
})
|
||||
|
||||
// 检查是否存在 processstats === 0 的记录
|
||||
if (data?.list?.[0]?.processstats === 0) {
|
||||
dialogVisible.value = false
|
||||
message.alertError('已申请')
|
||||
return
|
||||
}
|
||||
|
||||
rowinfo.value = row
|
||||
// 设置基础数据
|
||||
formData.value.examId = row.examId
|
||||
formData.value.orgId = orgId
|
||||
formData.value.regId = row.regId
|
||||
formData.value.pname = row.pname
|
||||
formData.value.applyDoctor = doctorname
|
||||
dialogTitle.value = t('action.' + type)
|
||||
if(data?.list?.[0]?.processstats === 0){
|
||||
dialogVisible.value = false
|
||||
message.alertError('已申请')
|
||||
return
|
||||
}
|
||||
else{
|
||||
dialogVisible.value = true
|
||||
}
|
||||
}
|
||||
async function save() {
|
||||
if (!formRef.value)
|
||||
return
|
||||
await formRef.value.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
formData.value.id = rowinfo.value.id
|
||||
formData.value.examId = rowinfo.value.examId
|
||||
formData.value.regId = rowinfo.value.regId
|
||||
formData.value.orgId = formData.value.orgId
|
||||
formData.value.applyDoctor = formData.value.applyDoctor
|
||||
formData.value.pname = rowinfo.value.pname
|
||||
formData.value.applyDateTime = new Date().toLocaleString().replace(/\//g, '-')
|
||||
const savedata = formData.value as unknown as ProcessManageVO
|
||||
ProcessManageApi.create(savedata).then((data) => {
|
||||
if (data) {
|
||||
message.alertSuccess('申请成功')
|
||||
dialogVisible.value = false
|
||||
emit('success')
|
||||
} else {
|
||||
message.alertError('申请失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ opendiag }) // 提供 open 方法,用于打开弹窗
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
defineOptions({ name: 'ECGApplyforRepair' })
|
||||
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.ApplyforRepair {
|
||||
width: 680px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.info-section {
|
||||
margin-bottom: 10px;
|
||||
padding: 2px;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #d7d7d7;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user