输血管理模块
This commit is contained in:
parent
09f1900b7f
commit
1b1c15113d
@ -354,6 +354,112 @@ export function txPrint(query?: Object) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 临床发血退血 删除单据
|
||||||
|
export function txdeleteData(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/backin/deleteData',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 获取血液信息
|
||||||
|
export function bfqueryBloodInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/discardMain/queryBloodInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 查询单个申请单信息
|
||||||
|
export function bfdqueryInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/discardMain/queryInfoOne',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 查询列表
|
||||||
|
export function bfdqueryList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/discardMain/queryList',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 保存申请单信息
|
||||||
|
export function bfdSaveData(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/discardMain/saveData',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 审核申请单信息
|
||||||
|
export function bfdAuditData(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/discardMain/auditData',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 打印申请单信息
|
||||||
|
export function bfdPrint(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/backin/print',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 删除血液
|
||||||
|
export function delbfdBloodInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/backin/deleteBloodInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//血液报废 删除申请单信息
|
||||||
|
export function delbfdInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/bloodbank/discardMain/deleteData',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//回收血液信息
|
||||||
|
export function getrecBloodInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/nurse/recycleBag/getBloodInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//批量查询血液回收单据信息
|
||||||
|
export function getrecBatchList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/nurse/recycleBag/batchSearch',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//批量查询血液回收信息列表
|
||||||
|
export function queryBatchBloodInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/nurse/recycleBag/queryBatchBloodInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保存血液回收单据信息
|
||||||
|
export function recSaveData(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/bus/nurse/recycleBag/saveData',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ service.interceptors.request.use((config: any) => {
|
|||||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||||
const message = '数据正在处理,请勿重复提交'
|
const message = '数据正在处理,请勿重复提交'
|
||||||
console.warn(`[${s_url}]: ` + message)
|
console.warn(`[${s_url}]: ` + message)
|
||||||
return Promise.reject(new Error(message))
|
// return Promise.reject(new Error(message))
|
||||||
} else {
|
} else {
|
||||||
cache.session.setJSON('sessionObj', requestObj)
|
cache.session.setJSON('sessionObj', requestObj)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -570,6 +570,8 @@ const bloodEnter = () => {
|
|||||||
} else if (res.data.length > 1) { //多条血液数据进行弹窗选择
|
} else if (res.data.length > 1) { //多条血液数据进行弹窗选择
|
||||||
maskRef.value.open(res.data)
|
maskRef.value.open(res.data)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
bloodNo.value = ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="血型">
|
<el-form-item label="血型">
|
||||||
<el-input v-model="formData.abo_type" placeholder="" disabled />
|
<div class="blood-type-group">
|
||||||
|
<div class="blood-type-tag ab"><span class="x_type">{{ formData.abo_type || '-' }}</span> 型</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -104,7 +106,13 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="Rh(D)">
|
<el-form-item label="Rh(D)">
|
||||||
<el-input v-model="formData.rh_type" placeholder="" disabled />
|
<!-- <el-input v-model="formData.rh_type" placeholder="" disabled /> -->
|
||||||
|
<div class="blood-type-group">
|
||||||
|
<div :class="['blood-type-tag', 'rh',]">
|
||||||
|
<span :class="[formData.rh_type == '+' ? '' : formData.rh_type == '-' ? 'red' : '']">
|
||||||
|
{{ formData.rh_type == '+' ? '阳性' : formData.rh_type == '-' ? '阴性' : '未知' }}</span> RH
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -235,8 +243,8 @@
|
|||||||
:value="option.value" />
|
:value="option.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<template #second_match_method="{ row }">
|
<template #check_method="{ row }">
|
||||||
<el-select v-model="row.second_match_method" placeholder="" class="full-width-input">
|
<el-select v-model="row.check_method" placeholder="" class="full-width-input">
|
||||||
<el-option v-for="option in dictData.pxff" :key="option.value" :label="option.label"
|
<el-option v-for="option in dictData.pxff" :key="option.value" :label="option.label"
|
||||||
:value="option.value" />
|
:value="option.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -401,7 +409,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="bill_no" label="配血单号" align="center" width="150" />
|
<el-table-column prop="bill_no" label="配血单号" align="center" width="150" />
|
||||||
<el-table-column prop="apply_no" label="申请单号" align="center" width="150" />
|
<el-table-column prop="apply_no" label="申请单号" align="center" width="150" />
|
||||||
<el-table-column prop="beinhos_id" label="住院号/ID号" align="center" width="150" />
|
|
||||||
<el-table-column prop="dept_id" label="科室" align="center">
|
<el-table-column prop="dept_id" label="科室" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatDict(scope.row.dept_id, 'ks') }}
|
{{ formatDict(scope.row.dept_id, 'ks') }}
|
||||||
@ -544,7 +551,7 @@ const matchColumns = ref([
|
|||||||
{ label: '供者血型复核', prop: 'offer_affirm_abo', align: 'center', visible: true, width: 120, slot: 'offer_affirm_abo', showOverflowTooltip: false },
|
{ label: '供者血型复核', prop: 'offer_affirm_abo', align: 'center', visible: true, width: 120, slot: 'offer_affirm_abo', showOverflowTooltip: false },
|
||||||
{ label: '供者Rh(D)复核', prop: 'check_offer_rh', align: 'center', visible: true, width: 120, slot: 'check_offer_rh', showOverflowTooltip: false },
|
{ label: '供者Rh(D)复核', prop: 'check_offer_rh', align: 'center', visible: true, width: 120, slot: 'check_offer_rh', showOverflowTooltip: false },
|
||||||
{ label: '配血方法', prop: 'match_method', align: 'center', visible: true, width: 150, slot: 'match_method', 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: 'first_side', align: 'center', visible: true, width: 150, slot: 'first_side', showOverflowTooltip: false },
|
{ label: '主侧', prop: 'first_side', align: 'center', visible: true, width: 150, slot: 'first_side', showOverflowTooltip: false },
|
||||||
{ label: '次侧', prop: 'second_side', align: 'center', visible: true, width: 150, slot: 'second_side', showOverflowTooltip: false },
|
{ label: '次侧', prop: 'second_side', align: 'center', visible: true, width: 150, slot: 'second_side', showOverflowTooltip: false },
|
||||||
{ label: '结果', prop: 'result', align: 'center', visible: true, width: 150, slot: 'result', showOverflowTooltip: false },
|
{ label: '结果', prop: 'result', align: 'center', visible: true, width: 150, slot: 'result', showOverflowTooltip: false },
|
||||||
@ -607,6 +614,8 @@ const bloodEnter = () => {
|
|||||||
} else if (res.data.length > 1) {
|
} else if (res.data.length > 1) {
|
||||||
maskRef.value.open(res.data)
|
maskRef.value.open(res.data)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
bloodNo.value = ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -674,7 +683,7 @@ const setMatchTable = (row) => {
|
|||||||
offer_affirm_abo: row.blood_type,
|
offer_affirm_abo: row.blood_type,
|
||||||
check_offer_rh: row.rh_blood_type,
|
check_offer_rh: row.rh_blood_type,
|
||||||
match_method: '006',
|
match_method: '006',
|
||||||
second_match_method: '002',
|
check_method: '002',
|
||||||
first_side: 'N',
|
first_side: 'N',
|
||||||
second_side: 'N',
|
second_side: 'N',
|
||||||
result: '001',
|
result: '001',
|
||||||
@ -949,4 +958,38 @@ onMounted(() => {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blood-type-group {
|
||||||
|
display: flex;
|
||||||
|
// width: 100%;
|
||||||
|
|
||||||
|
.blood-type-tag {
|
||||||
|
width: 9.375rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding-left: 20px;
|
||||||
|
|
||||||
|
&.ab {
|
||||||
|
background: url('@/assets/images/blood_zero.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
color: #3594c7;
|
||||||
|
|
||||||
|
.x_type {
|
||||||
|
color: #ff3b62;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.rh {
|
||||||
|
background-color: #e8f7ff;
|
||||||
|
color: #3594c7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red {
|
||||||
|
color: #f00 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -67,7 +67,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="血型">
|
<el-form-item label="血型">
|
||||||
<el-input v-model="form.abo_type" disabled />
|
<div class="blood-type-group">
|
||||||
|
<div class="blood-type-tag ab"><span class="x_type">{{ form.abo_type || '-' }}</span> 型</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -90,7 +92,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="Rh(D)">
|
<el-form-item label="Rh(D)">
|
||||||
<el-input v-model="form.rh_type" disabled />
|
<div class="blood-type-group">
|
||||||
|
<div :class="['blood-type-tag', 'rh',]">
|
||||||
|
<span :class="[form.rh_type == '+' ? '' : form.rh_type == '-' ? 'red' : '']">
|
||||||
|
{{ form.rh_type == '+' ? '阳性' : form.rh_type == '-' ? '阴性' : '未知' }}</span> RH
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -588,7 +595,6 @@ const onSearch = () => {
|
|||||||
xkCheckBloodtype.value.antibody1 = 'N'
|
xkCheckBloodtype.value.antibody1 = 'N'
|
||||||
xkCheckBloodtype.value.antibody2 = 'N'
|
xkCheckBloodtype.value.antibody2 = 'N'
|
||||||
xkCheckBloodtype.value.antibody3 = 'N'
|
xkCheckBloodtype.value.antibody3 = 'N'
|
||||||
xkCheckBloodtype.value.affirm_antibody = 'N'
|
|
||||||
getTime()
|
getTime()
|
||||||
|
|
||||||
if (form.value.rh_type == '-') {
|
if (form.value.rh_type == '-') {
|
||||||
@ -724,4 +730,37 @@ onMounted(() => {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blood-type-group {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.blood-type-tag {
|
||||||
|
width: 150px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding-left: 20px;
|
||||||
|
|
||||||
|
&.ab {
|
||||||
|
background: url('@/assets/images/blood_zero.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
color: #3594c7;
|
||||||
|
|
||||||
|
.x_type {
|
||||||
|
color: #ff3b62;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.rh {
|
||||||
|
background-color: #e8f7ff;
|
||||||
|
color: #3594c7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red {
|
||||||
|
color: #f00 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
414
src/views/blood/recycling/index.vue
Normal file
414
src/views/blood/recycling/index.vue
Normal file
@ -0,0 +1,414 @@
|
|||||||
|
/**
|
||||||
|
* @file index.vue
|
||||||
|
* @description: 批量血袋回收
|
||||||
|
* @author: w
|
||||||
|
* @since: 2026-09-11
|
||||||
|
*/
|
||||||
|
<template>
|
||||||
|
<div class="box-container">
|
||||||
|
<div class="card-box toolbar">
|
||||||
|
<!-- <el-button type="primary" plain @click="historyHandle">历史记录</el-button> -->
|
||||||
|
<el-button type="primary" plain @click="addHandle">新增</el-button>
|
||||||
|
<el-button type="success" plain :loading="saveLoading" @click="saveHandle">保存</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="top-content">
|
||||||
|
<div class="card-box scan-panel">
|
||||||
|
<div class="section-title">逐袋扫描</div>
|
||||||
|
<el-form :model="scanForm" label-width="auto" class="scan-form">
|
||||||
|
<el-form-item label="血液流水号"><el-input v-model="scanForm.blood_no" @keyup.enter="scanHandle" /></el-form-item>
|
||||||
|
<el-form-item label="科室">
|
||||||
|
<el-select v-model="scanForm.dept_id" placeholder="" disabled>
|
||||||
|
<el-option v-for="item in dictData.ks" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="住院号/ID号"><el-input v-model="scanForm.beinhos_id" disabled /></el-form-item>
|
||||||
|
<el-form-item label="患者姓名"><el-input v-model="scanForm.patient_name" disabled /></el-form-item>
|
||||||
|
<el-form-item label="性别"><el-input v-model="scanForm.patient_sex" disabled /></el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-box batch-panel">
|
||||||
|
<div class="section-title">批量处理</div>
|
||||||
|
<div class="batch-content">
|
||||||
|
<el-table ref="batchTableRef" :data="batchList" border height="100%" show-overflow-tooltip
|
||||||
|
@selection-change="batchSelection = $event">
|
||||||
|
<el-table-column type="selection" width="52" align="center" />
|
||||||
|
<el-table-column prop="bill_no" label="出库单号" min-width="110" align="center" />
|
||||||
|
<el-table-column prop="occur_date" label="出库日期" min-width="110" align="center" />
|
||||||
|
<el-table-column prop="patient_name" label="患者姓名" min-width="90" align="center" />
|
||||||
|
<el-table-column prop="beinhos_id" label="住院号/ID号" min-width="120" align="center" />
|
||||||
|
<el-table-column prop="dept_id" label="科室" min-width="90" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ formatDict(row.dept_id, 'ks') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="batch-actions">
|
||||||
|
<el-button type="primary" plain @click="openBatch">批量检索</el-button>
|
||||||
|
<el-button type="primary" plain @click="selectAll">全选</el-button>
|
||||||
|
<el-button type="primary" plain @click="clearSelection">全否</el-button>
|
||||||
|
<el-button type="success" plain @click="addBatch">批量增加</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-box" style="padding-bottom: 0;">
|
||||||
|
<el-form ref="formRef" :model="xkRecycleBagMain" label-width="auto" inline class="form-box">
|
||||||
|
|
||||||
|
<el-form-item label="接收人">
|
||||||
|
<SelectTable v-model:data="xkRecycleBagMain.receive_person" :tableData="userList" placeholder=""
|
||||||
|
width="150px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="接收时间">
|
||||||
|
<el-date-picker v-model="xkRecycleBagMain.receive_date" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="运送人">
|
||||||
|
<SelectTable v-model:data="xkRecycleBagMain.send_person" :tableData="userList" placeholder="" width="150px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="运送时间">
|
||||||
|
<el-date-picker v-model="xkRecycleBagMain.send_date" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="card-box registered-panel">
|
||||||
|
<div class="section-title">
|
||||||
|
<div> 已登记列表 </div>
|
||||||
|
<div style="margin-right: 30px"> 数量:{{ registeredList.length }} </div>
|
||||||
|
</div>
|
||||||
|
<el-table ref="regTableRef" :data="registeredList" border height="100%" show-overflow-tooltip
|
||||||
|
highlight-current-row>
|
||||||
|
<el-table-column prop="bill_no" label="出库单号" min-width="140" align="center" />
|
||||||
|
<el-table-column prop="blood_no" label="血液流水号" min-width="140" align="center" />
|
||||||
|
<el-table-column prop="product_no" label="产品码" min-width="110" align="center" />
|
||||||
|
<el-table-column prop="patient_name" label="患者姓名" min-width="90" align="center" />
|
||||||
|
<el-table-column prop="dept_id" label="科室" min-width="90" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ formatDict(row.dept_id, 'ks') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="bloodBreed" label="血液品种" min-width="150" 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="blood_type" label="血型" min-width="60" align="center" />
|
||||||
|
<el-table-column prop="capacity" label="容量" min-width="60" align="center" />
|
||||||
|
<el-table-column prop="unit" label="单位" min-width="60" align="center" />
|
||||||
|
<el-table-column label="操作" width="120" align="center" :show-overflow-tooltip="false">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-button type="primary" text @click="deleteHandle(row, $index)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<BloodMask ref="maskRef" :bloodBreed="bloodBreed" @selectRow="selectBlood" />
|
||||||
|
<el-dialog title="批量检索发血单" v-model="visible" width="420px" :close-on-click-modal="false">
|
||||||
|
<el-form ref="batchFormRef" :model="batchForm" label-width="80px">
|
||||||
|
<el-form-item label="开始时间">
|
||||||
|
<div class="date-range">
|
||||||
|
<el-date-picker v-model="batchForm.stime" type="date" value-format="YYYY-MM-DD" placeholder=""
|
||||||
|
style="width: 47%" />
|
||||||
|
<span class="separator" style="width: 6%;display: inline-block;text-align: center;">-</span>
|
||||||
|
<el-date-picker v-model="batchForm.etime" type="date" value-format="YYYY-MM-DD" placeholder=""
|
||||||
|
style="width: 47%" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="部门">
|
||||||
|
<SelectTable v-model:data="batchForm.dept" :tableData="dictData.ks" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="batchSearch">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
|
||||||
|
const { userList, getUserData, getServerTime, bloodBreed, getBloodList, } = useCommonDict()
|
||||||
|
import { getBloodBreed, queryBloodInfoByBloodNo } from '@/api/common'
|
||||||
|
import { getrecBatchList, getrecBloodInfo, queryBatchBloodInfo, recSaveData } from '@/api/blood'
|
||||||
|
import BloodMask from '../component/bloodMask.vue'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
import { getUser } from '@/api/system/user'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
||||||
|
const userInfo = useUserStore()
|
||||||
|
const xkRecycleBagMain = ref({
|
||||||
|
receive_person: userInfo.name,
|
||||||
|
receive_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
send_person: userInfo.name,
|
||||||
|
send_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
})
|
||||||
|
const scanForm = ref({})
|
||||||
|
const batchTableRef = ref()
|
||||||
|
const batchSelection = ref([])
|
||||||
|
const batchList = ref([])
|
||||||
|
const registeredList = ref([])
|
||||||
|
const saveLoading = ref(false)
|
||||||
|
const regTableRef = useTemplateRef('regTableRef')
|
||||||
|
const maskRef = useTemplateRef('maskRef')
|
||||||
|
const visible = ref(false)
|
||||||
|
const batchForm = ref({
|
||||||
|
stime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
etime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
dept: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const billNoList = ref([]) //选中的发血单号列表
|
||||||
|
const addHandle = () => {
|
||||||
|
scanForm.value = {}
|
||||||
|
registeredList.value = []
|
||||||
|
batchList.value = []
|
||||||
|
}
|
||||||
|
const deleteHandle = (row, index) => {
|
||||||
|
ElMessageBox.confirm(`确定删除${row.blood_no}数据吗?`,
|
||||||
|
'提示',
|
||||||
|
{ type: 'warning', }
|
||||||
|
).then(() => {
|
||||||
|
registeredList.value.splice(index, 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveHandle = () => {
|
||||||
|
if (!registeredList.value.length) return ElMessage.warning("请添加登记数据")
|
||||||
|
const data = {
|
||||||
|
billNoList: billNoList.value,
|
||||||
|
xkRecycleBagDetailList: registeredList.value,
|
||||||
|
xkRecycleBagMain: { ...xkRecycleBagMain.value, sum: registeredList.value.length }
|
||||||
|
}
|
||||||
|
saveLoading.value = true
|
||||||
|
recSaveData(data).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success("保存成功!")
|
||||||
|
addHandle()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
saveLoading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const scanHandle = () => {
|
||||||
|
if (!scanForm.value.blood_no) return
|
||||||
|
const index = registeredList.value.findIndex(item => item.blood_no == scanForm.value.blood_no)
|
||||||
|
if (index > -1) return ElMessage.warning("该血液流水号已被扫描过")
|
||||||
|
queryBloodInfoByBloodNo({ bloodNo: scanForm.value.blood_no }).then(res => {
|
||||||
|
if (res.data.length == 1) {
|
||||||
|
const row = res.data[0]
|
||||||
|
getBloodInfo(row)
|
||||||
|
} else if (res.data.length > 1) {
|
||||||
|
maskRef.value.open(res.data)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
scanForm.value.blood_no = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectBlood = (row) => {
|
||||||
|
getBloodInfo(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getBloodInfo = (row) => {
|
||||||
|
getrecBloodInfo({ bloodNo: row.blood_no, productNo: row.product_no }).then(res => {
|
||||||
|
if (!res.data) {
|
||||||
|
ElMessage.warning(res.msg)
|
||||||
|
scanForm.bloodNo = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
scanForm.value = res.data || {}
|
||||||
|
const info = {
|
||||||
|
blood_no: row.blood_no,
|
||||||
|
product_no: row.product_no,
|
||||||
|
sid: registeredList.value.length + 1,
|
||||||
|
...res.data
|
||||||
|
}
|
||||||
|
registeredList.value.push(info)
|
||||||
|
// bill_no加入之前判断billNoList中,如果存在则不加入
|
||||||
|
if (!billNoList.value.includes(info.bill_no)) {
|
||||||
|
billNoList.value.push(info.bill_no)
|
||||||
|
}
|
||||||
|
|
||||||
|
allRegSelect()
|
||||||
|
scanForm.value.blood_no = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const openBatch = () => {
|
||||||
|
batchForm.value = {
|
||||||
|
stime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
etime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
dept: ''
|
||||||
|
}
|
||||||
|
visible.value = true
|
||||||
|
}
|
||||||
|
const batchSearch = () => {
|
||||||
|
batchForm.value.stime = dayjs(batchForm.value.stime).format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
|
batchForm.value.etime = dayjs(batchForm.value.etime).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
|
getrecBatchList(batchForm.value).then(res => {
|
||||||
|
if (res.data.length) {
|
||||||
|
batchList.value = res.data
|
||||||
|
selectAll()
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('未查询到数据')
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
visible.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectAll = () => {
|
||||||
|
batchTableRef.value?.clearSelection()
|
||||||
|
batchTableRef.value?.toggleAllSelection()
|
||||||
|
}
|
||||||
|
const clearSelection = () => batchTableRef.value?.clearSelection()
|
||||||
|
const addBatch = () => {
|
||||||
|
if (!batchSelection.value.length) return ElMessage.warning('请选择一条数据')
|
||||||
|
queryBatchBloodInfo(batchSelection.value).then(res => {
|
||||||
|
if (res.data.length) {
|
||||||
|
// 判断获取到的数据与registeredList中是否包含该条数据
|
||||||
|
res.data.forEach(item => {
|
||||||
|
const index = registeredList.value.findIndex(row => row.blood_no == item.blood_no)
|
||||||
|
if (index > -1) {
|
||||||
|
res.data.splice(index, 1)
|
||||||
|
} else {
|
||||||
|
registeredList.value.push({ ...item, sid: registeredList.value.length + 1 })
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!billNoList.value.includes(item.bill_no)) {
|
||||||
|
billNoList.value.push(item.bill_no)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('未查询到数据')
|
||||||
|
}
|
||||||
|
allRegSelect()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const allRegSelect = () => {
|
||||||
|
regTableRef.value?.clearSelection()
|
||||||
|
regTableRef.value?.toggleAllSelection()
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getDictData('ks')
|
||||||
|
getBloodList()
|
||||||
|
getUserData()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.box-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-box {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-content {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
flex: 0 0 250px;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-panel {
|
||||||
|
width: 350px;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-panel,
|
||||||
|
.registered-panel {
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-panel {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.registered-panel {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-content {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-content :deep(.el-table) {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-actions {
|
||||||
|
width: 170px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-actions .el-button {
|
||||||
|
width: 70px;
|
||||||
|
margin-left: 0;
|
||||||
|
padding: 5px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.registered-panel :deep(.el-table) {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-table th.el-table__cell) {
|
||||||
|
background-color: #f4f1e8;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.top-content {
|
||||||
|
flex-basis: auto;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-panel {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-panel {
|
||||||
|
min-height: 230px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.registered-panel {
|
||||||
|
min-height: 280px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -10,6 +10,7 @@
|
|||||||
<div class="card-box toolbar">
|
<div class="card-box toolbar">
|
||||||
<el-button type="primary" plain @click="searchHandle">检索</el-button>
|
<el-button type="primary" plain @click="searchHandle">检索</el-button>
|
||||||
<el-button type="primary" plain @click="addHandle">新增单据</el-button>
|
<el-button type="primary" plain @click="addHandle">新增单据</el-button>
|
||||||
|
<el-button type="danger" plain @click="delHandle">删除单据</el-button>
|
||||||
<el-button type="success" plain :loading="saveLoading" @click="saveHandle">保存</el-button>
|
<el-button type="success" plain :loading="saveLoading" @click="saveHandle">保存</el-button>
|
||||||
<el-button type="primary" plain :loading="auditLoading" @click="auditHandle">审核</el-button>
|
<el-button type="primary" plain :loading="auditLoading" @click="auditHandle">审核</el-button>
|
||||||
<el-button type="warning" plain :loading="printLoading" @click="printHandle">打印</el-button>
|
<el-button type="warning" plain :loading="printLoading" @click="printHandle">打印</el-button>
|
||||||
@ -200,7 +201,7 @@
|
|||||||
<pagination v-show="total > 0" :total="total" v-model:page="searchForm.pageNum"
|
<pagination v-show="total > 0" :total="total" v-model:page="searchForm.pageNum"
|
||||||
v-model:limit="searchForm.pageSize" @pagination="getTxList" />
|
v-model:limit="searchForm.pageSize" @pagination="getTxList" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<BloodMask ref="maskRef" :bloodBreed="bloodBreed" @selectRow="selectBlood" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -209,12 +210,13 @@ import dayjs from 'dayjs'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
|
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
|
||||||
import { getBloodBreed, queryBloodInfoByBloodNo } from '@/api/common'
|
import { getBloodBreed, queryBloodInfoByBloodNo } from '@/api/common'
|
||||||
import { deleteBloodInfo, queryBloodInfo, txauditData, txPrint, txqueryInfo, txqueryList, txsaveData } from '@/api/blood'
|
import { deleteBloodInfo, queryBloodInfo, txauditData, txdeleteData, txPrint, txqueryInfo, txqueryList, txsaveData } from '@/api/blood'
|
||||||
import { printBase64PDF } from "@/utils/classCom"
|
import { printBase64PDF } from "@/utils/classCom"
|
||||||
const { userList, getUserData, getServerTime, bloodBreed, getBloodList, } = useCommonDict()
|
const { userList, getUserData, getServerTime, bloodBreed, getBloodList, } = useCommonDict()
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { ElMessageBox } from 'element-plus'
|
import { ElMessageBox } from 'element-plus'
|
||||||
import BloodTypeStatTable from "@/components/BloodTypeStatTable/index.vue"
|
import BloodTypeStatTable from "@/components/BloodTypeStatTable/index.vue"
|
||||||
|
import BloodMask from '../component/bloodMask.vue'
|
||||||
const userInfo = useUserStore()
|
const userInfo = useUserStore()
|
||||||
|
|
||||||
const bloodInfo = ref({})
|
const bloodInfo = ref({})
|
||||||
@ -243,6 +245,7 @@ const total = ref(0)
|
|||||||
const scannedList = ref<Array<Record<string, string>>>([])
|
const scannedList = ref<Array<Record<string, string>>>([])
|
||||||
const bloodList = ref([])
|
const bloodList = ref([])
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
|
const maskRef = useTemplateRef('maskRef')
|
||||||
|
|
||||||
const searchHandle = () => {
|
const searchHandle = () => {
|
||||||
getTxList()
|
getTxList()
|
||||||
@ -310,13 +313,21 @@ const scanHandle = () => {
|
|||||||
const index = bloodList.value.findIndex(item => item.blood_no == bloodInfo.value.blood_no)
|
const index = bloodList.value.findIndex(item => item.blood_no == bloodInfo.value.blood_no)
|
||||||
if (index > -1) return ElMessage.warning("该血液流水号已被扫描过")
|
if (index > -1) return ElMessage.warning("该血液流水号已被扫描过")
|
||||||
queryBloodInfoByBloodNo({ bloodNo: bloodInfo.value.blood_no }).then(res => {
|
queryBloodInfoByBloodNo({ bloodNo: bloodInfo.value.blood_no }).then(res => {
|
||||||
if (res.data.length) {
|
if (res.data.length == 1) {
|
||||||
const row = res.data[0]
|
const row = res.data[0]
|
||||||
getBloodInfo(row)
|
getBloodInfo(row)
|
||||||
|
} else if (res.data.length > 1) {
|
||||||
|
maskRef.value.open(res.data)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
bloodInfo.value.blood_no = ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const selectBlood = (row) => {
|
||||||
|
getBloodInfo(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const getBloodInfo = (row) => {
|
const getBloodInfo = (row) => {
|
||||||
queryBloodInfo({ bloodNo: row.blood_no, productNo: row.product_no }).then(res => {
|
queryBloodInfo({ bloodNo: row.blood_no, productNo: row.product_no }).then(res => {
|
||||||
@ -405,6 +416,21 @@ const addHandle = () => {
|
|||||||
scannedList.value = []
|
scannedList.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const delHandle = () => {
|
||||||
|
if (!formData.value.bill_no) return ElMessage.warning("请选择单据!")
|
||||||
|
ElMessageBox.confirm(`确定删除${formData.value.bill_no}单据吗?`,
|
||||||
|
'提示',
|
||||||
|
{ type: 'warning', }
|
||||||
|
).then(() => {
|
||||||
|
txdeleteData({ billNo: formData.value.bill_no }).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
addHandle()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const delBlood = (row, index) => {
|
const delBlood = (row, index) => {
|
||||||
ElMessageBox.confirm(`确定删除${row.blood_no}血液吗?`,
|
ElMessageBox.confirm(`确定删除${row.blood_no}血液吗?`,
|
||||||
'提示',
|
'提示',
|
||||||
|
|||||||
@ -85,9 +85,10 @@
|
|||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="血液品种">
|
<el-form-item label="血液品种">
|
||||||
<el-select v-model="bloodInfo.blood_type" disabled placeholder="">
|
<!-- <el-select v-model="bloodInfo.blood_breed" disabled placeholder="">
|
||||||
<el-option v-for="item in dictData.xylx" :label="item.label" :value="item.value" />
|
<el-option v-for="item in dictData.xylx" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
|
<el-input v-model="bloodInfo.blood_breed" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
@ -246,6 +247,10 @@ const onSearch = () => {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
queryBillOne({ billNo: form.value.bill_no }).then(res => {
|
queryBillOne({ billNo: form.value.bill_no }).then(res => {
|
||||||
bloodInfo.value = res.data[0] || {}
|
bloodInfo.value = res.data[0] || {}
|
||||||
|
//多条血液品种数据、拼接
|
||||||
|
const bloodBreed = res.data.map(item => item.blood_breed)
|
||||||
|
bloodInfo.value.blood_breed = bloodBreed.map(item => { return formatDict(item, 'xylx') }).join('、')
|
||||||
|
|
||||||
})
|
})
|
||||||
form.value.bill_no = ''
|
form.value.bill_no = ''
|
||||||
searchHandle()
|
searchHandle()
|
||||||
|
|||||||
500
src/views/blood/scrap/index.vue
Normal file
500
src/views/blood/scrap/index.vue
Normal file
@ -0,0 +1,500 @@
|
|||||||
|
/**
|
||||||
|
* @file index.vue
|
||||||
|
* @description: 血液报废
|
||||||
|
* @author: w
|
||||||
|
* @since: 2026-09-09
|
||||||
|
*/
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="box-container">
|
||||||
|
<div class="card-box toolbar">
|
||||||
|
<el-button type="primary" plain @click="searchHandle">检索</el-button>
|
||||||
|
<el-button type="primary" plain @click="addHandle">新增单据</el-button>
|
||||||
|
<el-button type="danger" plain @click="delHandle">删除单据</el-button>
|
||||||
|
<el-button type="success" plain :loading="saveLoading" @click="saveHandle">保存</el-button>
|
||||||
|
<el-button type="primary" plain :loading="auditLoading" @click="auditHandle">审核</el-button>
|
||||||
|
<!-- <el-button type="warning" plain :loading="printLoading" @click="printHandle">打印</el-button> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form :model="formData" label-width="auto" class="retreat-form" :disabled="!!formData.audit_person">
|
||||||
|
<div class="card-box retreat-info">
|
||||||
|
<div class="section-title"> 报废主信息 </div>
|
||||||
|
<div class="status">{{ formData.audit_person ? "已审核" : "未审核" }}</div>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="报废单单号">
|
||||||
|
<el-input v-model="formData.bill_no" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="经手人">
|
||||||
|
<SelectTable v-model:data="formData.handle_person" :tableData="userList" placeholder=""
|
||||||
|
:disabled="!!formData.audit_person" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="报废日期">
|
||||||
|
<el-date-picker v-model="formData.discard_date" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="报废途径">
|
||||||
|
<SelectTable v-model:data="formData.discard_approach" :tableData="dictData.bftj" placeholder=""
|
||||||
|
:disabled="!!formData.audit_person" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="报废方法">
|
||||||
|
<SelectTable v-model:data="formData.discard_method" :tableData="dictData.bffs" placeholder=""
|
||||||
|
:disabled="!!formData.audit_person" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="批准人">
|
||||||
|
<SelectTable v-model:data="formData.ratify_person" :tableData="userList" placeholder=""
|
||||||
|
:disabled="!!formData.audit_person" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="批准人意见">
|
||||||
|
<el-input v-model="formData.ratify_attitude" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content-row">
|
||||||
|
<div class="card-box scan-panel">
|
||||||
|
<div class="section-title">逐袋扫描</div>
|
||||||
|
<el-form-item label="血液流水号">
|
||||||
|
<el-input v-model="bloodInfo.blood_no" @keyup.enter="scanHandle" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品码">
|
||||||
|
<el-input v-model="bloodInfo.product_no" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="血液品种">
|
||||||
|
<el-input v-model="bloodInfo.blood_breed" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="血型">
|
||||||
|
<el-input v-model="bloodInfo.blood_type" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="容量">
|
||||||
|
<div class="capacity-fields">
|
||||||
|
<el-input v-model="bloodInfo.capacity" disabled />
|
||||||
|
<el-input v-model="bloodInfo.unit" disabled />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="有效日期">
|
||||||
|
<el-date-picker v-model="bloodInfo.valid_date" type="datetime" value-format="YYYY-MM-DD HH:mm"
|
||||||
|
format="YYYY-MM-DD HH:mm" disabled style="width:100%" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报废原因">
|
||||||
|
<el-select v-model="reason" placeholder="">
|
||||||
|
<el-option v-for="item in dictData.bfyy" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="统计信息"></el-form-item>
|
||||||
|
<BloodTypeStatTable :data="bloodList" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-box patient-panel">
|
||||||
|
<div class="table-title">已扫描列表</div>
|
||||||
|
<el-table :data="bloodList" border height="calc(100% - 130px)" show-overflow-tooltip highlight-current-row>
|
||||||
|
<el-table-column prop="blood_no" label="血液流水号" min-width="140" align="center" />
|
||||||
|
<el-table-column prop="product_no" label="产品码" min-width="120" align="center" />
|
||||||
|
<el-table-column prop="blood_breed" label="血液品种" min-width="120" 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="blood_type" label="血型" width="70" align="center" />
|
||||||
|
<el-table-column prop="capacity" label="容量" width="80" align="center" />
|
||||||
|
<el-table-column prop="unit" label="单位" width="60" align="center" />
|
||||||
|
<el-table-column prop="valid_date" label="有效日期" min-width="130" align="center" />
|
||||||
|
<el-table-column prop="reason" label="报废原因" min-width="120" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{dictData.bfyy.find(v => v.value == row.reason)?.label || row.reason}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 删除血液 -->
|
||||||
|
<el-table-column label="操作" align="center" :show-overflow-tooltip="false">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-button type="primary" text @click="delBlood(row, $index)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-dialog title="报废单检索" v-model="visible" width="1200px" :close-on-click-modal="false" @closed="handleClose">
|
||||||
|
<div class="mb10">
|
||||||
|
<el-button type="primary" @click="handleSearch">检索</el-button>
|
||||||
|
<el-button type="success" @click="handleConfirm">确认</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- 检索条件区 -->
|
||||||
|
<el-form :model="searchForm" label-width="auto" class="search-form">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="检索时间">
|
||||||
|
<div class="date-range">
|
||||||
|
<el-date-picker v-model="searchForm.stime" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
||||||
|
style="width: 47%" />
|
||||||
|
<span class="separator">-</span>
|
||||||
|
<el-date-picker v-model="searchForm.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="单号">
|
||||||
|
<el-input v-model="searchForm.billNo" placeholder="" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="tableData" border height="450" @row-click="jsRowclick" @row-dblclick="dblClickRow"
|
||||||
|
highlight-current-row show-overflow-tooltip>
|
||||||
|
<el-table-column prop="bill_no" label="报废单号" align="center" />
|
||||||
|
<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="total_money" align="center" />
|
||||||
|
<el-table-column prop="discard_date" label="报废日期" align="center" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
<BloodMask ref="maskRef" :bloodBreed="bloodBreed" @selectRow="selectBlood" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="Scrap">
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { getDictData, formatDict, dictData, useCommonDict } from '@/hooks'
|
||||||
|
import { getBloodBreed, queryBloodInfoByBloodNo } from '@/api/common'
|
||||||
|
import { delbfdBloodInfo, bfqueryBloodInfo, bfdAuditData, delbfdInfo, bfdPrint, bfdqueryInfo, bfdqueryList, bfdSaveData } from '@/api/blood'
|
||||||
|
import { printBase64PDF } from "@/utils/classCom"
|
||||||
|
const { userList, getUserData, getServerTime, bloodBreed, getBloodList, } = useCommonDict()
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
import BloodTypeStatTable from "@/components/BloodTypeStatTable/index.vue"
|
||||||
|
import BloodMask from '../component/bloodMask.vue'
|
||||||
|
const userInfo = useUserStore()
|
||||||
|
|
||||||
|
const bloodInfo = ref({})
|
||||||
|
const maskRef = useTemplateRef('maskRef')
|
||||||
|
const formData = ref({
|
||||||
|
handle_person: userInfo.name,
|
||||||
|
discard_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
})
|
||||||
|
|
||||||
|
const reason = ref('')
|
||||||
|
const tableData = ref([])
|
||||||
|
const selectRow = ref({})
|
||||||
|
const saveLoading = ref(false)
|
||||||
|
const auditLoading = ref(false)
|
||||||
|
const printLoading = ref(false)
|
||||||
|
const searchForm = ref({
|
||||||
|
stime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
etime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
})
|
||||||
|
const total = ref(0)
|
||||||
|
const bloodList = ref([])
|
||||||
|
const visible = ref(false)
|
||||||
|
|
||||||
|
const searchHandle = () => {
|
||||||
|
getbfList()
|
||||||
|
visible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const getbfList = () => {
|
||||||
|
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'
|
||||||
|
bfdqueryList(searchForm.value).then(res => {
|
||||||
|
tableData.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getbfList()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const jsRowclick = (row) => {
|
||||||
|
selectRow.value = row
|
||||||
|
}
|
||||||
|
|
||||||
|
const dblClickRow = (row) => {
|
||||||
|
selectRow.value = row
|
||||||
|
handleConfirm()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleConfirm = () => {
|
||||||
|
if (!selectRow.value.bill_no) return ElMessage.warning('请选择单据')
|
||||||
|
getbfInfo(selectRow.value.bill_no)
|
||||||
|
visible.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
const getbfInfo = (billNo) => {
|
||||||
|
bfdqueryInfo({ billNo }).then(res => {
|
||||||
|
formData.value = res.data.xkDiscardMain
|
||||||
|
bloodList.value = res.data.xkDiscardDetailList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
tableData.value = []
|
||||||
|
selectRow.value = {}
|
||||||
|
searchForm.value = {
|
||||||
|
stime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
etime: dayjs().format('YYYY-MM-DD'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const scanHandle = () => {
|
||||||
|
if (!reason.value) return ElMessage.warning('请选择报废单原因')
|
||||||
|
if (!bloodInfo.value.blood_no) return
|
||||||
|
const index = bloodList.value.findIndex(item => item.blood_no == bloodInfo.value.blood_no)
|
||||||
|
if (index > -1) return ElMessage.warning("该血液流水号已被扫描过")
|
||||||
|
queryBloodInfoByBloodNo({ bloodNo: bloodInfo.value.blood_no }).then(res => {
|
||||||
|
if (res.data.length == 1) {
|
||||||
|
const row = res.data[0]
|
||||||
|
getBloodInfo(row)
|
||||||
|
} else if (res.data.length > 1) {
|
||||||
|
maskRef.value.open(res.data)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
bloodInfo.value.blood_no = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectBlood = (row) => {
|
||||||
|
getBloodInfo(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getBloodInfo = (row) => {
|
||||||
|
bfqueryBloodInfo({ bloodNo: row.blood_no, productNo: row.product_no }).then(res => {
|
||||||
|
if (!res.data) {
|
||||||
|
ElMessage.warning(res.msg)
|
||||||
|
bloodInfo.value.blood_no = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
bloodInfo.value = res.data || {}
|
||||||
|
const row = {
|
||||||
|
bill_no: formData.value.bill_no,
|
||||||
|
reason: reason.value,
|
||||||
|
...res.data
|
||||||
|
}
|
||||||
|
bloodList.value.push(row)
|
||||||
|
bloodInfo.value.blood_no = ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveHandle = () => {
|
||||||
|
const data = {
|
||||||
|
xkDiscardMain: {
|
||||||
|
...formData.value,
|
||||||
|
input_person: userInfo.name,
|
||||||
|
input_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
},
|
||||||
|
xkDiscardDetailList: bloodList.value.map((item, i) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
sid: i
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
saveLoading.value = true
|
||||||
|
|
||||||
|
bfdSaveData(data).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
formData.value.bill_no = res.data
|
||||||
|
ElMessage.success("保存成功!")
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
saveLoading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const auditHandle = () => {
|
||||||
|
if (!formData.value.bill_no) return ElMessage.warning("请选择单据!")
|
||||||
|
auditLoading.value = true
|
||||||
|
bfdAuditData({ billNo: formData.value.bill_no }).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
getbfInfo(formData.value.bill_no)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
auditLoading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const printHandle = () => {
|
||||||
|
return
|
||||||
|
if (!formData.value.bill_no) return ElMessage.warning("请选择单据!")
|
||||||
|
printLoading.value = true
|
||||||
|
bfdPrint({ billNo: formData.value.bill_no, templateName: "BLOOD_OUT_BACK" }).then(res => {
|
||||||
|
if (res.code == 0 && res.data) {
|
||||||
|
printBase64PDF(res.data)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
printLoading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const addHandle = () => {
|
||||||
|
formData.value = {
|
||||||
|
handle_person: userInfo.name,
|
||||||
|
discard_date: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
}
|
||||||
|
bloodInfo.value = {}
|
||||||
|
bloodList.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
const delHandle = () => {
|
||||||
|
if (!formData.value.bill_no) return ElMessage.warning("请选择单据!")
|
||||||
|
ElMessageBox.confirm(`确定删除${formData.value.bill_no}单据吗?`,
|
||||||
|
'提示',
|
||||||
|
{ type: 'warning', }
|
||||||
|
).then(() => {
|
||||||
|
delbfdInfo({ billNo: formData.value.bill_no }).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
addHandle()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const delBlood = (row, index) => {
|
||||||
|
ElMessageBox.confirm(`确定删除${row.blood_no}血液吗?`,
|
||||||
|
'提示',
|
||||||
|
{ type: 'warning', }
|
||||||
|
).then(() => {
|
||||||
|
bloodList.value.splice(index, 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getUserData()
|
||||||
|
getBloodList()
|
||||||
|
getDictData('ks', 'bftj', 'bffs', 'bfyy')
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.box-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.retreat-form {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.retreat-info {
|
||||||
|
position: relative;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.status {
|
||||||
|
position: absolute;
|
||||||
|
top: 34px;
|
||||||
|
right: 30px;
|
||||||
|
color: #409eff;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
border: 2px solid #409eff;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-row {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-panel {
|
||||||
|
width: 350px;
|
||||||
|
flex: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-panel {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.capacity-fields {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.capacity-fields .el-input:first-child {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.capacity-fields .el-input:last-child {
|
||||||
|
width: 52px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-title {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
// align-items: center;
|
||||||
|
|
||||||
|
/* 左侧蓝色小竖线 */
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 2px;
|
||||||
|
bottom: 2px;
|
||||||
|
width: 4px;
|
||||||
|
height: 14px;
|
||||||
|
background-color: #409eff;
|
||||||
|
margin-right: 8px;
|
||||||
|
border-radius: 0 4px 4px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-panel :deep(.el-table) {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel-box {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user