临床发血、打印模板维护

This commit is contained in:
wuyy 2026-08-27 09:37:45 +08:00
parent cde6435982
commit d924d02e71
8 changed files with 777 additions and 101 deletions

View File

@ -218,4 +218,87 @@ export function queryListResult(query?: Object) {
params: query
})
}
// 查询待处理申请单数据
export function queryOutWaitInfo(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/queryWaitInfo',
method: 'get',
params: query
})
}
// 查询申请单数据
export function queryOutOne(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/queryOne',
method: 'get',
params: query
})
}
// 查询发血单数据列表
export function queryOutList(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/queryList',
method: 'post',
data: query
})
}
// 查询多次发血单数据列表
export function queryMoreBloodOutList(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/queryMoreBloodOutList',
method: 'get',
params: query
})
}
// 保存临床发血数据
export function saveBloodInfo(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/saveData',
method: 'post',
data: query
})
}
// 查询单条发血单数据
export function queryOutInfo(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/queryInfo',
method: 'get',
params: query
})
}
// 通知护士取血
export function notifyMessage(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/notifyMessage',
method: 'get',
params: query
})
}
// 获取发血数据
export function getBloodInfoOut(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/getBloodInfoOut',
method: 'get',
params: query
})
}
// 临床发血审核
export function bloodOutAudit(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/bloodOutAudit',
method: 'post',
data: query
})
}
// 打印单据
export function printReport(query?: Object) {
return request({
url: '/bus/bloodbank/bloodOut/printReport',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,36 @@
import request from '@/utils/request'
// 查询列表
export function queryList(query?: Object) {
return request({
url: '/bus/bloodbank/xkReportTemplate/queryList',
method: 'post',
data: query
})
}
// 新增列表
export function addTemplate(query?: Object) {
return request({
url: '/bus/bloodbank/xkReportTemplate/add',
method: 'post',
data: query
})
}
// 修改列表
export function updateTemplate(query?: Object) {
return request({
url: '/bus/bloodbank/xkReportTemplate/update',
method: 'post',
data: query
})
}
// 删除列表
export function delTemplate(query?: Object) {
return request({
url: '/bus/bloodbank/xkReportTemplate/delete',
method: 'get',
params: query
})
}

View File

@ -12,10 +12,10 @@
<el-button type="primary" plain @click="addMatch">新增单据</el-button>
<el-button type="success" plain :disabled="bloodInfo.bill_status && bloodInfo.bill_status != 'A'"
@click="saveBloodApply" :loading="saveLoading">保存</el-button>
<el-button type="primary" plain>通知取血</el-button>
<el-button type="primary" plain>审核</el-button>
<el-button type="primary" plain>多次发血</el-button>
<el-button type="warning" plain>打印</el-button>
<el-button type="primary" plain @click="tzHandle">通知取血</el-button>
<el-button type="primary" plain @click="auditHandle">审核</el-button>
<el-button type="primary" plain @click="openDcHandle">多次发血</el-button>
<el-button type="warning" plain :loading="printLoading" @click="printHandle">打印</el-button>
<el-button type="warning" plain>打印标签</el-button>
</div>
@ -25,9 +25,9 @@
<div class="card-box">
<div class="section-title">
<div> 申请单信息 </div>
<div v-show="bloodInfo.bill_no">
<!-- <div v-show="bloodInfo.bill_no">
配血单号:{{ bloodInfo.bill_no || '' }}
</div>
</div> -->
</div>
<div class="status" v-show="formData.bill_stasus"
:style="{ borderColor: getBillStatusInfo(formData.bill_stasus).color, color: getBillStatusInfo(formData.bill_stasus).color }">
@ -66,7 +66,9 @@
</el-col>
<el-col :span="4">
<el-form-item label="血型">
<el-input v-model="formData.abo_type" placeholder="" disabled />
<el-select v-model="formData.abo_type" placeholder="">
<el-option v-for="item in dictData.abotype" :key="item.value" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4"></el-col>
@ -93,7 +95,9 @@
</el-col>
<el-col :span="4">
<el-form-item label="Rh(D)">
<el-input v-model="formData.rh_type" placeholder="" disabled />
<el-select v-model="formData.rh_type" placeholder="">
<el-option v-for="item in dictData.rhtype" :key="item.value" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4"></el-col>
@ -153,7 +157,7 @@
</el-row>
<el-table :data="bloodApplyTable" border height="120">
<el-table :data="bloodApplyTable" border height="120" show-overflow-tooltip>
<el-table-column prop="blood_breed" label="血液品种" align="center">
<template #default="{ row }">
{{bloodBreed.find(v => v.value == row.blood_breed)?.label || row.blood_breed}}
@ -190,30 +194,30 @@
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="发血单号">
<el-input v-model="bloodInfo.billNo" placeholder="" disabled />
<el-input v-model="bloodInfo.bill_no" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="发血时间">
<el-date-picker v-model="bloodInfo.ops_time" type="datetime" placeholder=""
<el-date-picker v-model="bloodInfo.occur_date" type="datetime" placeholder=""
value-format="YYYY-MM-DD HH:mm:ss" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="发血经手人">
<SelectTable v-model:data="bloodInfo.ops_person" :tableData="userList" placeholder="" />
<SelectTable v-model:data="bloodInfo.handle_person" :tableData="userList" placeholder="" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="取血人">
<SelectTable v-model:data="bloodInfo.qxr" :tableData="userList" placeholder="" />
<SelectTable v-model:data="bloodInfo.take_person" :tableData="userList" placeholder="" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="通知取血时间">
<el-date-picker v-model="bloodInfo.qxtime" type="datetime" placeholder=""
<el-date-picker v-model="bloodInfo.notify_time" type="datetime" placeholder=""
value-format="YYYY-MM-DD HH:mm:ss" />
</el-form-item>
</el-col>
@ -234,7 +238,7 @@
</el-select>
<el-input v-model="bloodNo" placeholder="" @keyup.enter="bloodEnter" style="width: 250px;margin:0 20px;" />
<el-checkbox v-model="bloodFlag">血液是否有特殊处理</el-checkbox>
<el-input v-model="bloodNo" placeholder="" @keyup.enter="bloodEnter" style="width: 250px;"
<el-input v-model="tsbloodNo" placeholder="" @keyup.enter="bloodEnter" style="width: 250px;"
:disabled="!bloodFlag" />
</div>
<div class="table-box">
@ -245,13 +249,12 @@
<template #match_method="{ row }">
{{ formatDict(row.match_method, 'pxff') }}
</template>
<template #second_match_method="{ row }">
{{ formatDict(row.second_match_method, 'pxff') }}
<template #check_method="{ row }">
{{ formatDict(row.check_method, 'pxff') }}
</template>
<template #result="{ row }">
{{ formatDict(row.result, 'pxjg') }}
</template>
</CustomTable>
</div>
</div>
@ -301,7 +304,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="审核标志">
<el-select v-model="searchForm.audit_flag" placeholder="请选择">
<el-select v-model="searchForm.audit_flag" placeholder="">
<el-option label="未审核" value="0" />
<el-option label="已审核" value="1" />
</el-select>
@ -316,10 +319,15 @@
</el-form>
<!-- 结果表格区 -->
<el-table :data="tableData" border height="450" @row-click="jsRowclick" highlight-current-row>
<el-table-column prop="ckno" label="出库单号" align="center" />
<el-table-column prop="ckDAte" label="出库日期" align="center" />
<el-table-column prop="ckDAte" label="发血经手人" align="center" />
<el-table :data="tableData" border height="450" @row-click="jsRowclick" highlight-current-row
show-overflow-tooltip>
<el-table-column prop="bill_no" label="出库单号" align="center" />
<el-table-column prop="occur_date" label="出库日期" align="center" width="150" />
<el-table-column prop="handle_person" label="发血经手人" align="center">
<template #default="scope">
{{userList.find(v => v.value == scope.row.handle_person)?.label || scope.row.handle_person}}
</template>
</el-table-column>
<el-table-column label="患者姓名" prop="patient_name" align="center" />
<el-table-column prop="beinhos_id" label="住院号/ID号" align="center" width="150" />
<el-table-column prop="dept_id" label="科室" align="center">
@ -327,32 +335,105 @@
{{ formatDict(scope.row.dept_id, 'ks') }}
</template>
</el-table-column>
<el-table-column prop="audit_flag" label="审核标志" width="150" align="center" />
<el-table-column prop="blood_bred" label="申请品种" align="center" />
<el-table-column prop="check_sign" label="审核标志" width="150" align="center">
<template #default="scope">
{{ scope.row.check_sign == 'Y' ? '已审核' : '未审核' }}
</template>
</el-table-column>
<el-table-column prop="req_breed" label="申请品种" align="center" />
<el-table-column prop="apply_no" label="申请单号" align="center" width="150" />
</el-table>
</el-dialog>
<el-dialog title="多次发血" v-model="matchVisible" width="1200px" :close-on-click-modal="false" @closed="handleDcClose">
<div class="mb10">
<el-button type="primary" @click="searchMatchHandle">检索</el-button>
<el-button type="success" @click="aginHandle">继续发血</el-button>
</div>
<el-form :model="matchForm" label-width="auto" class="search-form">
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="申请日期">
<div class="date-range">
<el-date-picker v-model="matchForm.stime" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
style="width: 47%" />
<span class="separator">-</span>
<el-date-picker v-model="matchForm.etime" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
style="width: 47%" />
</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="科室">
<SelectTable v-model:data="matchForm.dept" :tableData="dictData.ks" placeholder="" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="床号">
<el-input v-model="matchForm.bed_no" placeholder="" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="住院号/ID号">
<el-input v-model="matchForm.beinhos_id" placeholder="" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="姓名">
<el-input v-model="matchForm.patient_name" placeholder="" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="matchTableData" border height="450" @row-click="dcRowclick" highlight-current-row>
<el-table-column prop="apply_no" label="申请单号" align="center" />
<el-table-column prop="dept_id" label="科室" align="center">
<template #default="scope">
{{ formatDict(scope.row.dept_id, 'ks') }}
</template>
</el-table-column>
<el-table-column prop="patient_bed" label="床号" align="center" />
<el-table-column prop="patient_name" label="患者姓名" align="center" />
<el-table-column prop="beinhos_id" label="住院号/ID号" align="center" />
<el-table-column prop="blood_breed" label="血液品种" align="center">
<template #default="{ row }">
{{bloodBreed.find(v => v.value == row.blood_breed)?.label || row.blood_breed}}
</template>
</el-table-column>
<el-table-column prop="sl" label="袋数" align="center" />
<el-table-column prop="rl" label="容量" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
</el-table>
</el-dialog>
<BloodMask ref="maskRef" :bloodBreed="bloodBreed" @selectRow="selectBlood" />
</div>
</template>
<script setup lang="ts">
<script setup lang="ts" name="Clinical">
import DropdownTableSelect, { type TableColumnItem, type TableRowItem } from '@/components/DropdownTableSelect/index.vue'
import dayjs from 'dayjs'
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
import {
queryMatchBloodList, queryMatchOne, queryWaitInfo, getBloodInfoMatch, checkBloodMatched, saveBloodData, queryMatchApplyInfo, cancelBloodInfoMatch,
queryOutList, queryOutOne, queryOutWaitInfo, getBloodInfoOut, checkBloodMatched, saveBloodInfo, queryOutInfo, cancelBloodInfoMatch,
notifyMessage, queryMoreBloodOutList, bloodOutAudit, printReport
} from '@/api/blood'
import { queryBloodInfoByBloodNo } from '@/api/common'
import { ElMessageBox, ElMessage } from 'element-plus'
import useUserStore from '@/store/modules/user'
import { printBase64PDF } from '@/utils/classCom'
import BloodMask from '../component/bloodMask.vue'
const userInfo = useUserStore()
const { userList, getUserData, getServerTime, bloodBreed, getBloodList, } = useCommonDict()
const maskRef = useTemplateRef('maskRef')
const visible = ref(false)
const bloodInfo = ref({})
const bloodInfo = ref({
occur_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
notify_time: dayjs().format('YYYY-MM-DD HH:mm:ss'),
handle_person: userInfo.name
})
const saveLoading = ref(false)
const billStatus = ref([
@ -367,26 +448,67 @@ const searchForm = ref({
const tableData = ref([])
const matchVisible = ref(false)
const matchForm = ref({
stime: dayjs().format('YYYY-MM-DD'),
etime: dayjs().format('YYYY-MM-DD'),
})
const matchTableData = ref([])
const openDcHandle = () => {
matchVisible.value = true
searchMatchHandle()
}
const searchMatchHandle = () => {
matchForm.value.stime = dayjs(matchForm.value.stime).format('YYYY-MM-DD') + ' 00:00:00'
matchForm.value.etime = dayjs(matchForm.value.etime).format('YYYY-MM-DD') + ' 23:59:59'
queryMoreBloodOutList({ ...matchForm.value }).then(res => {
matchTableData.value = res.data
})
}
const handleDcClose = () => {
matchVisible.value = false
matchForm.value = {
stime: dayjs().format('YYYY-MM-DD'),
etime: dayjs().format('YYYY-MM-DD'),
}
}
const dcRow = ref({})
const moreSign = ref("N") //Y 多次发血 N 没有发血
const dcRowclick = (row) => {
dcRow.value = row
}
const aginHandle = () => {
if (!dcRow.value.apply_no) return ElMessage.warning('请选择单据')
moreSign.value = "Y"
formData.value.bill_no = dcRow.value.apply_no
getSqdInfo()
dcRow.value = {}
matchVisible.value = false
}
const applyColumns = ref<TableColumnItem[]>([
{ label: '申请单号', prop: 'bill_no' },
{ label: '患者姓名', prop: 'patient_name' },
{ label: '科室', prop: 'dept_id', slotName: 'dept_id' },
{ label: '申请品种', prop: 'blood_breed', slotName: 'blood_breed' }
{ label: '血液品种', prop: 'blood_breed', slotName: 'blood_breed' }
])
const applyTableData = ref<TableRowItem[]>([])
const bloodFlag = ref(false)
const bloddStatus = {
'1': '在库',
'4': '出库',
'2': '报废',
}
// 主表单数据
const formData = ref({})
const printLoading = ref(false)
const bloodNo = ref('')
const tsbloodNo = ref('')
// 配血操作单选
const matchSelect = ref('add')
@ -404,9 +526,9 @@ const matchColumns = ref([
{ label: 'Rh(D)', prop: 'rh_blood_type', align: 'center', visible: true, },
{ label: '容量', prop: 'capacity', align: 'center', visible: true, },
{ label: '单位', prop: 'unit', align: 'center', visible: true, },
{ label: '有效日期', prop: 'match_date', align: 'center', visible: true, width: 150, showOverflowTooltip: false },
{ label: '有效日期', prop: 'valid_date', align: 'center', visible: true, width: 150, showOverflowTooltip: false },
{ label: '配血方法', prop: 'match_method', align: 'center', visible: true, width: 150, slot: 'match_method', showOverflowTooltip: false },
{ label: '复核配血方法', prop: 'second_match_method', align: 'center', visible: true, width: 150, slot: 'second_match_method', showOverflowTooltip: false },
{ label: '复核配血方法', prop: 'check_method', align: 'center', visible: true, width: 150, slot: 'check_method', showOverflowTooltip: false },
{ label: '结果', prop: 'result', align: 'center', visible: true, width: 150, slot: 'result', showOverflowTooltip: false },
])
@ -433,11 +555,8 @@ const bloodEnter = () => {
if (matchSelect.value == 'del') {
if (index > -1) {
ElMessageBox.confirm(`确定取消血液${matchTable.value[index].blood_no}数据吗?`, '提示', { type: 'warning' }).then(() => {
cancelBloodInfoMatch({ bloodNo: matchTable.value[index].blood_no, productNo: matchTable.value[index].product_no }).then(res => {
matchTable.value.splice(index, 1)
})
matchTable.value.splice(index, 1)
})
} else {
ElMessage.warning('该血液流水号不存在,请检查!')
}
@ -446,32 +565,40 @@ const bloodEnter = () => {
queryBloodInfoByBloodNo({ bloodNo: bloodNo.value }).then(res => {
if (res.data.length == 1) {
const row = res.data[0]
checkBloodMatched({ bloodNo: row.blood_no, productNo: row.product_no, billNo: formData.value.bill_no }).then(res => {
if (res.code == 0) {
getBloodInfo(row)
}
if (res.code == 2) {
ElMessageBox.alert(`${res.msg}`, '提示', { type: 'warning' }).then(() => {
getBloodInfo(row)
})
}
})
checkBlood(row)
} else if (res.data.length > 1) {
maskRef.value.open(res.data)
}
})
}
}
const selectBlood = (row) => {
checkBlood(row)
}
// 血液校验
const checkBlood = (row) => {
checkBloodMatched({ bloodNo: row.blood_no, productNo: row.product_no, billNo: formData.value.bill_no }).then(res => {
if (res.code == 0) {
getBloodInfo(row)
}
if (res.code == 2) {
ElMessageBox.alert(`${res.msg}`, '提示', { type: 'warning' }).then(() => {
getBloodInfo(row)
})
}
})
}
// 获取血液信息
const getBloodInfo = (row) => {
getBloodInfoMatch({ bloodNo: row.blood_no, productNo: row.product_no }).then(res => {
getBloodInfoOut({ bloodNo: row.blood_no, productNo: row.product_no, applyNo: formData.value.bill_no }).then(res => {
const row = res.data || {}
const msgArr: string[] = []
// ABO不匹配提示
if (row.blood_type != formData.value.abo_type) {
msgArr.push(`该血液流水号的血型与患者复核的血型结果不一致,请注意!`)
msgArr.push(`该血液流水号的血型${row.blood_type}与患者复核的血型${formData.value.abo_type}结果不一致,请注意!`)
}
// Rh不匹配提示
if (row.rh_blood_type != formData.value.rh_type) {
@ -496,19 +623,11 @@ const getBloodInfo = (row) => {
const setMatchTable = (row) => {
matchTable.value.push({
...row,
second_match_medic: '',
offer_affirm_abo: row.blood_type,
check_offer_rh: row.rh_blood_type,
...row.xkBloodInfo,
price: row.price,
match_method: '006',
second_match_method: '002',
first_side: 'N',
second_side: 'N',
check_method: '002',
result: '001',
match_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
match_medic: userInfo.name,
position_blood: '',
position_barcode: '',
})
matchTable.value.forEach((item, index) => {
item.sid = index + 1
@ -521,8 +640,8 @@ const setMatchTable = (row) => {
const selectRow = ref({})
const openJsHandle = () => {
// visible.value = true
// handleSearch()
visible.value = true
handleSearch()
}
const handleClose = () => {
@ -545,26 +664,120 @@ const jsRowclick = (row) => {
const getBloodMatchInfo = () => {
return
queryMatchApplyInfo({ billNo: selectRow.value.bill_no, applyNo: selectRow.value.apply_no }).then(res => {
formData.value = res.data.matchMainInfoList[0] || {}
queryOutInfo({ billNo: selectRow.value.bill_no }).then(res => {
formData.value = res.data.applyInfoList[0] || {}
bloodApplyTable.value = res.data.xkTransfuseApplyBloodbreedList || []
matchTable.value = res.data.matchDetailInfoList || []
bloodInfo.value = res.data.matchDetailInfoList[0] || {}
matchTable.value = res.data.stockInfoList || []
bloodInfo.value = res.data.xkOutMain || {}
})
}
const handleSearch = () => {
searchForm.value.stime = dayjs(searchForm.value.stime).format('YYYY-MM-DD') + ' 00:00:00'
searchForm.value.etime = dayjs(searchForm.value.etime).format('YYYY-MM-DD') + ' 23:59:59'
queryMatchBloodList(searchForm.value).then(res => {
// tableData.value = res.data || []
queryOutList(searchForm.value).then(res => {
tableData.value = res.data || []
})
}
const saveBloodApply = () => {
return
//判断发血时间、通知取血时间大于当前时间7天
const isFlag = checkTimeTip(bloodInfo.value.occur_date, bloodInfo.value.notify_time)
if (!isFlag) return
saveLoading.value = true
const data = {
moreSign: moreSign.value,
xkOutMain: {
...bloodInfo.value,
apply_no: formData.value.bill_no,
input_person: userInfo.name,
dept_id: formData.value.dept_id,
beinhos_id: formData.value.beinhos_id,
input_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
check_sign: 'N',
patient_name: formData.value.patient_name,
total_money: matchTable.value.reduce((sum, item) => {
return sum + Number(item.price || 0)
}, 0),
},
xkOutDetailList: matchTable.value.map((item, i) => ({
...item,
bill_no: bloodInfo.value.bill_no,
have_reaction: 'N',
finish_sign: 'N',
accept_flag: 'N',
sid: i + 1
})),
xkTransfuseApply: {
abo_type: formData.value.abo_type,
rh_type: formData.value.rh_type,
bill_no: formData.value.bill_no
}
}
saveBloodInfo(data).then(res => {
if (res.code == 0) {
ElMessage.success('保存成功!')
addMatch()
}
}).finally(() => {
saveLoading.value = false
})
}
function checkTimeTip(sendBloodTime, notifyGetBloodTime) {
const now = dayjs()
const sendDiff = Math.abs(now.diff(dayjs(sendBloodTime), 'day'))
const notifyDiff = Math.abs(now.diff(dayjs(notifyGetBloodTime), 'day'))
let msg: string[] = []
if (sendDiff > 7) {
msg.push('发血时间与当前时间超过七天;')
}
if (notifyDiff > 7) {
msg.push('通知取血时间与当前时间超过七天;')
}
if (msg) {
ElMessageBox.alert(msg.join('<br/>'), '提示', { type: 'warning', dangerouslyUseHTMLString: true })
return false
} else {
return true
}
}
const tzHandle = () => {
if (!formData.value.bill_no) return ElMessage.warning('请选择配血单!')
notifyMessage({ billNo: bloodInfo.value.bill_no }).then(res => {
if (res.code == 0) {
ElMessage.success(res.msg)
}
})
}
const auditHandle = () => {
const data = {
applyNo: formData.value.bill_no,
billNo: bloodInfo.value.bill_no,
takePerson: bloodInfo.value.take_person,
userId: userInfo.name
}
bloodOutAudit(data).then(res => {
if (res.code == 0) {
ElMessage.success(res.msg)
}
})
}
const printHandle = () => {
printLoading.value = true
if (!bloodInfo.value.bill_no) return ElMessage.warning('请选择配血单!')
printReport({ billNo: bloodInfo.value.bill_no, templateName: 'BLOOD_OUT' }).then(res => {
if (res.data) {
printBase64PDF(res.data)
}
}).finally(() => {
printLoading.value = false
})
}
const addMatch = () => {
@ -572,20 +785,33 @@ const addMatch = () => {
bloodApplyTable.value = []
matchTable.value = []
selectRow.value = {}
bloodInfo.value = {}
bloodInfo.value = {
occur_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
notify_time: dayjs().format('YYYY-MM-DD HH:mm:ss'),
handle_person: userInfo.name
}
moreSign.value = "N"
}
const loadApplyData = () => {
queryWaitInfo().then(res => {
// applyTableData.value = res.data || []
queryOutWaitInfo().then(res => {
applyTableData.value = res.data || []
})
}
const searchApply = () => {
queryMatchOne({ billNo: formData.value.bill_no }).then(res => {
// formData.value = res.data.matchMainInfoList[0] || {}
// bloodApplyTable.value = res.data.xkTransfuseApplyBloodbreedList
moreSign.value = "N"
getSqdInfo()
}
const getSqdInfo = () => {
queryOutOne({ applyNo: formData.value.bill_no, moreSign: moreSign.value }).then(res => {
formData.value = res.data.applyInfoList[0] || {}
bloodApplyTable.value = res.data.xkTransfuseApplyBloodbreedList
matchTable.value = res.data.stockInfoList || []
bloodInfo.value.occur_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
bloodInfo.value.notify_time = dayjs().format('YYYY-MM-DD HH:mm:ss')
bloodInfo.value.handle_person = userInfo.name
if (formData.value.rh_type == '-') {
// 阴性弹出框提示
ElMessageBox.alert(`患者为Rh(D)阴性血型,请注意!`, '提示', { type: 'warning' })
@ -594,8 +820,6 @@ const searchApply = () => {
}
onMounted(() => {
getDictData('ks', 'bq', 'sxmd', 'billApplyStatus', 'ktsx', 'abotype', 'subgroup', 'sxzz', 'rhtype', 'pxff', 'pxjg', 'zccc', 'test_result')
getBloodList()

View File

@ -0,0 +1,54 @@
<template>
<div>
<el-dialog title="血液信息" v-model="visible" width="700px" :close-on-click-modal="false" @closed="handleDcClose">
<div class="tips"> *请选择具体的血液(双击) </div>
<el-table :data="tableData" border height="300" @row-dblclick="handleRowClick">
<el-table-column prop="blood_no" label="血液流水号" />
<el-table-column prop="product_no" label="产品码" />
<el-table-column prop="blood_breed" label="血液品种">
<template #default="{ row }">
{{bloodBreed.find(v => v.value == row.blood_breed)?.label || row.blood_breed}}
</template>
</el-table-column>
<el-table-column prop="blood_type" label="血型" />
</el-table>
</el-dialog>
</div>
</template>
<script setup lang="ts">
const props = defineProps<{
bloodBreed,
}>()
const visible = ref(false)
const tableData = ref([])
const emits = defineEmits(['selectRow'])
const open = (arr) => {
tableData.value = arr
visible.value = true
}
const handleDcClose = () => {
tableData.value = []
visible.value = false
}
const handleRowClick = (row) => {
emits('selectRow', row)
handleDcClose()
}
defineExpose({
open
})
</script>
<style scoped lang="scss">
.tips {
color: #0f40b1;
margin-bottom: 10px;
font-size: 15px;
font-weight: 600;
}
</style>

View File

@ -165,7 +165,7 @@
</el-row>
<el-table :data="bloodApplyTable" border height="120">
<el-table :data="bloodApplyTable" border height="120" show-overflow-tooltip>
<el-table-column prop="blood_breed" label="血液品种" align="center" width="150">
<template #default="{ row }">
{{bloodBreed.find(v => v.value == row.blood_breed)?.label || row.blood_breed}}
@ -321,7 +321,8 @@
</el-form>
<div class="table-box">
<el-table :data="resultTable" border height="100%" highlight-current-row @row-click="handleRowClick">
<el-table :data="resultTable" border height="100%" highlight-current-row show-overflow-tooltip
@row-click="handleRowClick">
<el-table-column label="配血日期" prop="test_date" align="center" width="150" />
<el-table-column label="患者姓名" prop="patient_name" align="center" />
<el-table-column label="单据状态" prop="bill_status" align="center">
@ -457,10 +458,12 @@
总计:{{ kcTableData.length }} 袋
</div>
</el-dialog>
<BloodMask ref="maskRef" :bloodBreed="bloodBreed" @selectRow="selectBlood" />
</div>
</template>
<script setup lang="ts">
<script setup lang="ts" name="CrossMatching">
import DropdownTableSelect, { type TableColumnItem, type TableRowItem } from '@/components/DropdownTableSelect/index.vue'
import dayjs from 'dayjs'
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
@ -471,10 +474,12 @@ import {
import { queryBloodInfoByBloodNo } from '@/api/common'
import { ElMessageBox, ElMessage } from 'element-plus'
import useUserStore from '@/store/modules/user'
import BloodMask from '../component/bloodMask.vue'
const userInfo = useUserStore()
const { userList, getUserData, getServerTime, bloodBreed, getBloodList, } = useCommonDict()
const maskRef = useTemplateRef('maskRef')
const visible = ref(false)
const kcvisible = ref(false)
const kcTableData = ref([])
@ -589,7 +594,6 @@ const bloodEnter = () => {
matchTable.value.splice(index, 1)
})
})
} else {
ElMessage.warning('该血液流水号不存在,请检查!')
}
@ -598,21 +602,31 @@ const bloodEnter = () => {
queryBloodInfoByBloodNo({ bloodNo: bloodNo.value }).then(res => {
if (res.data.length == 1) {
const row = res.data[0]
checkBloodMatched({ bloodNo: row.blood_no, productNo: row.product_no, billNo: formData.value.bill_no }).then(res => {
if (res.code == 0) {
getBloodInfo(row)
}
if (res.code == 2) {
ElMessageBox.alert(`${res.msg}`, '提示', { type: 'warning' }).then(() => {
getBloodInfo(row)
})
}
})
checkBlood(row)
} else if (res.data.length > 1) {
maskRef.value.open(res.data)
}
})
}
}
const selectBlood = (row) => {
checkBlood(row)
}
// 血液校验
const checkBlood = (row) => {
checkBloodMatched({ bloodNo: row.blood_no, productNo: row.product_no, billNo: formData.value.bill_no }).then(res => {
if (res.code == 0) {
getBloodInfo(row)
}
if (res.code == 2) {
ElMessageBox.alert(`${res.msg}`, '提示', { type: 'warning' }).then(() => {
getBloodInfo(row)
})
}
})
}
const removeRow = (index) => {
ElMessageBox.confirm(`确定删除血液${matchTable.value[index].blood_no}数据吗?`, '提示', { type: 'warning' }).then(() => {
cancelBloodInfoMatch({ bloodNo: matchTable.value[index].blood_no, productNo: matchTable.value[index].product_no }).then(res => {

View File

@ -435,7 +435,7 @@
</div>
</template>
<script setup lang="ts">
<script setup lang="ts" name="Recheck">
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
import DropdownTableSelect, { type TableColumnItem, type TableRowItem } from '@/components/DropdownTableSelect/index.vue'
import dayjs from 'dayjs'
@ -590,6 +590,9 @@ const onSearch = () => {
// 阴性弹出框提示
ElMessageBox.alert(`请注意:Rh(D)阴性血液!`, '提示', { type: 'warning' })
}
if (form.value.reaction_history == 'Y') {
ElMessageBox.alert(`请注意:该患者有输血反应史!`, '提示', { type: 'warning' })
}
})
}

View File

@ -102,7 +102,7 @@
<el-form-item label="评估单" prop="assess_bill_no">
<DropdownTableSelect v-model="xkTransfuseApply.assess_bill_no" :columnList="pgcolumnList"
:tableData="pgList" tableWidth="700px" labelField="bill_no" :showSearch="false" @open="getPgList"
:readonly="true" @change="getPgInfo">
@change="getPgInfo" :disabled="xkTransfuseApply.bill_stasus && xkTransfuseApply.bill_stasus != 'A'">
<template #assess_person="{ row }">
{{userList.find(v => v.value == row.assess_person)?.label || row.assess_person}}
</template>
@ -179,7 +179,8 @@
<el-col :span="6">
<el-form-item label="手术名称" prop="operation_name">
<DropdownTableSelect v-model="xkTransfuseApply.operation_name" :columnList="operationColumn"
:tableData="operationList" tableWidth="350px" labelField="oper_name" @change="getOperationInfo" />
:tableData="operationList" tableWidth="350px" labelField="oper_name" @change="getOperationInfo"
:disabled="xkTransfuseApply.bill_stasus && xkTransfuseApply.bill_stasus != 'A'" />
</el-form-item>
</el-col>
<el-col :span="5">

View File

@ -0,0 +1,261 @@
/**
* @file index.vue
* @description: 打印模板维护
* @author: w
* @since: 2026-06-09
*/
<template>
<div class="box-container">
<div class="search-card" style="padding-bottom: 0;">
<el-form :model="searchForm" inline label-width="auto">
<el-form-item label="模板名称:">
<el-input v-model="searchForm.report_name" placeholder="" />
</el-form-item>
</el-form>
</div>
<div class="table-card">
<div class="mb10">
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
</div>
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
@row-click="handleRowClick">
<template #report_no="{ row }">
<div class="downLink" @click="downFile(row)">
{{ row.report_no }}
</div>
</template>
<template #action="{ row }">
<el-button type="primary" text @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" text @click="handleDel(row)">删除</el-button>
</template>
</CustomTable>
</div>
<el-dialog :title="title" v-model="open" width="400px" :close-on-click-modal="false" @close="close">
<el-form ref="formRef" :model="form" label-width="auto" :rules="rules">
<el-form-item label="文件名:" prop="report_name">
<el-input v-model="form.report_name" placeholder="请输入文件名" />
</el-form-item>
</el-form>
<el-upload ref="uploadRef" :limit="1" accept=".jrxml" action="#" :on-change="changeFile" :file-list="fileList"
:on-exceed="handleExceed" :on-remove="() => { fileList = [] }" :auto-upload="false" drag>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<template #tip>
<div class="el-upload__tip text-center">
<span>仅允许导入jrxml格式文件。</span>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm">确 定</el-button>
<el-button @click="open = false">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
import { queryList, addTemplate, updateTemplate, delTemplate } from '@/api/system/template'
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
import { ElMessage, ElMessageBox } from 'element-plus'
const { userList, getUserData, } = useCommonDict()
import Download from '@/plugins/download'
const searchForm = reactive({})
const fileList = ref([])
const open = ref(false)
const form = ref({})
const rules = ref({
report_name: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
})
const formRef = useTemplateRef("formRef")
const selectedRow = ref({})
const loading = ref(false)
const tableData = ref([])
const columns = ref([
{ label: '模板ID', prop: 'report_id', align: 'center', visible: true, width: 100 },
{ label: '模板名称', prop: 'report_name', align: 'center', visible: true, },
{ label: '模板文件', prop: 'report_no', align: 'center', visible: true, slot: 'report_no' },
{ label: '创建时间', prop: 'create_time', align: 'center', visible: true, },
])
const tableConfig = ref({
border: true,
highlightCurrentRow: true,
height: 'calc(100% - 40px)',
actionWidth: 200,
})
const title = ref('')
const fileInfo = ref({})
// 事件处理
const handleSearch = () => {
getList()
}
const handleAdd = () => {
title.value = '新增模板'
open.value = true;
}
/**文件上传中处理 */
const changeFile = (file, fileArray) => {
// console.log("file", file, "fileList:", fileList)
fileInfo.value = file;
fileList.value = fileArray;
form.value.report_no = file.name
form.value.report_size = file.size
form.value.create_time = dayjs().format('YYYY-MM-DD HH:mm:ss')
form.value.update_time = dayjs().format('YYYY-MM-DD HH:mm:ss')
};
const handleExceed = () => {
ElMessage.warning('只能上传一个文件!')
};
const close = () => {
open.value = false;
form.value = {}
fileInfo.value = {}
fileList.value = []
formRef.value.resetFields()
}
const handleEdit = (row) => {
title.value = '编辑模板'
form.value = { ...row, creatTime: dayjs(row.create_time).format('YYYY-MM-DD HH:mm:ss'), updateTime: dayjs(row.update_time).format('YYYY-MM-DD HH:mm:ss') }
fileList.value = [
{
name: row.report_no,
status: 'done',
size: row.report_size,
}
]
open.value = true;
}
/** 提交上传文件 */
function submitFileForm() {
formRef.value.validate((valid: boolean) => {
if (!valid) return;
if (!fileList.value.length) return ElMessage.error('请上传模板文件!')
if (title.value == '新增模板') {
addTemplate(form.value).then(res => {
if (res.code == 0) {
ElMessage.success(res.msg)
close()
getList()
}
})
} else {
updateTemplate(form.value).then(res => {
if (res.code == 0) {
ElMessage.success(res.msg)
close()
getList()
}
})
}
})
};
const handleDel = (row) => {
ElMessageBox.confirm('此操作将永久删除该模板, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
delTemplate({ reportNo: row.report_no }).then(res => {
if (res.code == 0) {
ElMessage.success(res.msg)
getList()
}
})
})
}
const downFile = (row) => {
// console.log('row==>', row);
Download.name(row.report_no, false)
}
const handleRowClick = (val) => {
selectedRow.value = val
}
const getList = () => {
loading.value = true
queryList(searchForm).then(res => {
tableData.value = res.data
}).finally(() => {
loading.value = false
})
}
onMounted(() => {
getDictData('ks', 'billApplyStatus', 'xylx')
getUserData()
getList()
})
</script>
<style scoped lang="scss">
.box-container {
display: flex;
flex-direction: column;
gap: 10px;
// 顶部搜索卡片(和第二张图样式完全一致)
.search-card {
background: #ffffff;
border-radius: 6px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
padding: 10px;
:deep(.el-form-item) {
margin-bottom: 8px;
}
.divider {
font-weight: 700;
color: #dbdbdb;
margin: 0 8px;
}
}
// 表格卡片(和第二张图样式完全一致)
.table-card {
background: #fff;
border-radius: 6px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
padding: 12px;
flex: 1;
min-height: 0;
}
}
.downLink {
color: blue;
cursor: pointer;
&:hover {
text-decoration: underline;
}
}
</style>