标本流转
This commit is contained in:
parent
f1e076de3f
commit
2585c6bc76
@ -9,3 +9,27 @@ export function querySample(query?: Object) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取未签收的标本
|
||||||
|
export function querySampleSign(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/transit/querySampleSign',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 签收标本
|
||||||
|
export function sampleSign(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/transit/sampleSign',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 退回的标本
|
||||||
|
export function querySampleSignBack(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/transit/querySampleSignBack',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -34,7 +34,7 @@ import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
|||||||
// 组件参数
|
// 组件参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pidValue: { type: [String, Number], default: '' },
|
pidValue: { type: [String, Number], default: '' },
|
||||||
PatType: { type: String, required: true },
|
PatType: { type: String },
|
||||||
placeholder: { type: String, default: '请输入或双击选择' },
|
placeholder: { type: String, default: '请输入或双击选择' },
|
||||||
clearable: { type: Boolean, default: true },
|
clearable: { type: Boolean, default: true },
|
||||||
disabled: { type: Boolean, default: false },
|
disabled: { type: Boolean, default: false },
|
||||||
|
|||||||
@ -4,49 +4,53 @@
|
|||||||
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="委托机构:" prop="srcHospName">
|
<el-form-item label="委托机构:" prop="SrcHospName">
|
||||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择委托机构"
|
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择委托机构" />
|
||||||
@getDataValue="handleQuery" />
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="检测医院:" prop="DstHospName">
|
||||||
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
|
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="条码号:" prop="barcode">
|
<el-form-item label="条码号:" prop="Barcode">
|
||||||
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="姓名:" prop="patName">
|
<el-form-item label="姓名:" prop="PatName">
|
||||||
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="申请项目:" prop="SrcOrderItemName">
|
<el-form-item label="申请项目:" prop="checkPUR">
|
||||||
<el-input v-model="queryParams.SrcOrderItemName" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="标本状态:" prop="Status">
|
<el-form-item label="标本状态:" prop="Status">
|
||||||
<el-select v-model="queryParams.Status" placeholder="请选择" clearable @change="handleQuery">
|
<el-select v-model="queryParams.Status" placeholder="请选择" clearable>
|
||||||
<!-- <el-option label="已打印" value="1" />
|
<el-option v-for="item in regdictList" :label="item.dictName" :value="item.dictCode" />
|
||||||
<el-option label="未打印" value="0" /> -->
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="采样人:" prop="affirmUserName">
|
<el-form-item label="采样人:" prop="affirmUserName">
|
||||||
<el-input v-model="queryParams.affirmUserName" placeholder="请输入采样人" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.affirmUserName" placeholder="请输入采样人" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="签收人:" prop="signInUserName">
|
<el-form-item label="签收人:" prop="signInUserName">
|
||||||
<el-input v-model="queryParams.signInUserName" placeholder="请输入签收人" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.signInUserName" placeholder="请输入签收人" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="时间类型:" prop="DateType">
|
<el-form-item label="时间类型:" prop="DateType">
|
||||||
<el-select v-model="queryParams.DateType" placeholder="请选择" clearable @change="handleQuery">
|
<el-select v-model="queryParams.DateType" placeholder="请选择">
|
||||||
<el-option label="登记时间" value="登记时间" />
|
<el-option label="登记时间" value="登记时间" />
|
||||||
<el-option label="采样时间" value="采样时间" />
|
<el-option label="采样时间" value="采样时间" />
|
||||||
<el-option label="送出时间" value="送出时间" />
|
<el-option label="送出时间" value="送出时间" />
|
||||||
@ -69,10 +73,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||||
@size-change="sizeChange" @page-change="currentChange">
|
@size-change="sizeChange" @page-change="currentChange" @row-click="rowHandle">
|
||||||
<template #patAge="{ row }">
|
<template #patAge="{ row }">
|
||||||
{{ row.patAge }}{{ row.ageUnit }}
|
{{ row.patAge }}{{ row.ageUnit }}
|
||||||
</template>
|
</template>
|
||||||
|
<template #status="{ row }">
|
||||||
|
{{ formatDict(row.status, regdictList) }}
|
||||||
|
</template>
|
||||||
|
<template #patSex="{ row }">
|
||||||
|
{{ row.patSex == 1 ? '男' : '女' }}
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
<!-- 样本流程 -->
|
<!-- 样本流程 -->
|
||||||
@ -101,6 +111,8 @@ import { classCom } from '@/utils/classCom';
|
|||||||
const aotuSize = classCom.useAutoSize();
|
const aotuSize = classCom.useAutoSize();
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { listhospital } from "@/api/regional/dict/hospital.js";
|
import { listhospital } from "@/api/regional/dict/hospital.js";
|
||||||
|
// @ts-ignore
|
||||||
|
import { listregdict } from "@/api/regional/dict/regdict.js";
|
||||||
|
|
||||||
const queryParams: any = ref({
|
const queryParams: any = ref({
|
||||||
pageSize: 50,
|
pageSize: 50,
|
||||||
@ -108,20 +120,21 @@ const queryParams: any = ref({
|
|||||||
})
|
})
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const columns: any = ref([
|
const columns: any = ref([
|
||||||
{ prop: 'barcode', label: '条码', align: 'center', visible: true, },
|
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, },
|
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
|
||||||
{ prop: 'patName', label: '姓名', align: 'center', visible: true, },
|
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 70 },
|
||||||
{ prop: 'patSex', label: '性别', align: 'center', visible: true, },
|
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
|
||||||
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge" },
|
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
|
||||||
// { prop: 'ageUnit', label: '龄', align: 'center', visible: true, },
|
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
|
||||||
{ prop: 'checkPUR', label: '项目名称', align: 'center', visible: true, },
|
{ prop: 'sampleTypeName', label: '标本类型', align: 'center', visible: true, },
|
||||||
{ prop: 'sampleTypeName', label: '标本类型名称', align: 'center', visible: true, },
|
{ prop: 'tubeName', label: '采集容器', align: 'center', visible: true, },
|
||||||
{ prop: 'Status', label: '状态', align: 'center', visible: true, },
|
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
|
||||||
|
{ prop: 'moveStateName', label: '流转状态', align: 'center', visible: true, },
|
||||||
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
||||||
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, },
|
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'signInUserName', label: '签收人', align: 'center', visible: true, },
|
{ prop: 'signInUserName', label: '签收人', align: 'center', visible: true, },
|
||||||
{ prop: 'signInTime', label: '签收时间', align: 'center', visible: true, },
|
{ prop: 'signInTime', label: '签收时间', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
|
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, width: 150 },
|
||||||
])
|
])
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
@ -188,7 +201,6 @@ const resetHandle = () => {
|
|||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
console.log('page==>', page);
|
|
||||||
queryParams.value.pageNum = page.currentPage
|
queryParams.value.pageNum = page.currentPage
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
@ -196,13 +208,32 @@ const sizeChange = (page: { currentPage: number, pageSize: number }) => {
|
|||||||
queryParams.value.pageSize = page.pageSize
|
queryParams.value.pageSize = page.pageSize
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const rowHandle = (row: any) => {
|
||||||
|
timelineItems.value =
|
||||||
|
[
|
||||||
|
{ title: '检验申请', time: row.orderTime },
|
||||||
|
{ title: '标本采集', time: row.affirmTime },
|
||||||
|
{ title: '标本送检', time: row.signInDate },
|
||||||
|
{ title: '标本外送', time: row.sendPackTime },
|
||||||
|
{ title: '标本签收', time: row.signInTime },
|
||||||
|
{ title: '上机检测', time: row.testDate },
|
||||||
|
{ title: '结果审核', time: row.auditTime },
|
||||||
|
{ title: '报告发布', time: row.reportTime },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
const tableRefs = ref()
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
querySample(queryParams.value).then((res: any) => {
|
querySample(queryParams.value).then((res: any) => {
|
||||||
tableData.value = res.rows
|
tableData.value = res.rows
|
||||||
pagination.value.total = res.total
|
pagination.value.total = res.total
|
||||||
|
tableRefs.value.setCurrentRow(res.rows[0])
|
||||||
|
rowHandle(res.rows[0])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const hosList = ref([])
|
const hosList = ref([])
|
||||||
|
const regdictList: any = ref([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
listhospital().then((res: any) => {
|
listhospital().then((res: any) => {
|
||||||
@ -213,7 +244,16 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
|
||||||
|
regdictList.value = res.rows;
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const formatDict = (v: string, arr: Array<any>) => {
|
||||||
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -4,42 +4,43 @@
|
|||||||
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="委托机构:" prop="srcHospName">
|
<el-form-item label="委托机构:" prop="SrcHospName">
|
||||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="[]" label="label"
|
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
:size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构"
|
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
|
||||||
@getDataValue="handleQuery" />
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="检测医院:" prop="DstHospName">
|
||||||
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
|
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="条码号:" prop="Barcode">
|
||||||
|
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="姓名:" prop="PatName">
|
||||||
|
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="申请项目:" prop="checkPUR">
|
||||||
|
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="条码号:" prop="barcode">
|
<el-form-item label="时间类型:" prop="DateType">
|
||||||
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
<el-select v-model="queryParams.DateType" placeholder="请选择">
|
||||||
</el-form-item>
|
<el-option label="登记时间" value="登记时间" />
|
||||||
</el-col>
|
<el-option label="采样时间" value="采样时间" />
|
||||||
<el-col :span="5">
|
<el-option label="送出时间" value="送出时间" />
|
||||||
<el-form-item label="姓名:" prop="patName">
|
<el-option label="签收时间" value="签收时间" />
|
||||||
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="申请项目:" prop="OrderItemName">
|
|
||||||
<el-input v-model="queryParams.OrderItemName" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="标本状态:" prop="dybz">
|
|
||||||
<el-select v-model="queryParams.dybz" placeholder="请选择" clearable @change="handleQuery">
|
|
||||||
<!-- <el-option label="已打印" value="1" />
|
|
||||||
<el-option label="未打印" value="0" /> -->
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="采样人:" prop="affirmUserName">
|
|
||||||
<el-input v-model="queryParams.affirmUserName" placeholder="请输入采样人" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="日期:" prop="times">
|
<el-form-item label="日期:" prop="times">
|
||||||
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
|
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
|
||||||
@ -47,31 +48,30 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary">查询</el-button>
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
<el-button>重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb10">
|
<div class="mb10">
|
||||||
<el-button type="primary">标本签收</el-button>
|
<el-button type="primary" @click="qsHandle(50)">标本签收</el-button>
|
||||||
<el-button type="primary">标本拒签</el-button>
|
<el-button type="primary" @click="qsHandle(110)">标本拒签</el-button>
|
||||||
<el-popover placement="bottom">
|
<el-button type="primary" plain @click="qsHandle(100)">标本退回</el-button>
|
||||||
<template #reference>
|
|
||||||
<el-button type="primary" plain>其他操作 <el-icon>
|
|
||||||
<ArrowDown />
|
|
||||||
</el-icon></el-button>
|
|
||||||
</template>
|
|
||||||
<div class="btns">
|
|
||||||
<el-button type="primary" plain>标本退回</el-button>
|
|
||||||
<el-button type="primary" plain>更换条码</el-button>
|
|
||||||
<el-button type="primary" plain>取消签收</el-button>
|
|
||||||
</div>
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination">
|
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||||
|
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||||
|
<template #patAge="{ row }">
|
||||||
|
{{ row.patAge }}{{ row.ageUnit }}
|
||||||
|
</template>
|
||||||
|
<template #status="{ row }">
|
||||||
|
{{ formatDict(row.status, regdictList) }}
|
||||||
|
</template>
|
||||||
|
<template #patSex="{ row }">
|
||||||
|
{{ row.patSex == 1 ? '男' : '女' }}
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -79,33 +79,41 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import { querySample } from '@/api/regional/index'
|
import { querySampleSign, sampleSign } from '@/api/regional/index'
|
||||||
import SelectTable from '@/components/SelectTable/index.vue';
|
import SelectTable from '@/components/SelectTable/index.vue';
|
||||||
|
// @ts-ignore
|
||||||
|
import { listhospital } from "@/api/regional/dict/hospital.js";
|
||||||
|
// @ts-ignore
|
||||||
|
import { listregdict } from "@/api/regional/dict/regdict.js";
|
||||||
import { classCom } from '@/utils/classCom';
|
import { classCom } from '@/utils/classCom';
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
const aotuSize = classCom.useAutoSize();
|
const aotuSize = classCom.useAutoSize();
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
const queryParams: any = ref({})
|
const router = useRouter()
|
||||||
|
const queryParams: any = ref({
|
||||||
|
pageSize: 50,
|
||||||
|
pageNum: 1
|
||||||
|
})
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const columns: any = ref([
|
const columns: any = ref([
|
||||||
{ type: 'selection', align: 'center', visible: true, },
|
{ type: 'selection', align: 'center', visible: true, width: 40 },
|
||||||
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, },
|
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
|
||||||
{ prop: 'patName', label: '姓名', align: 'center', visible: true, },
|
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 70 },
|
||||||
{ prop: 'patSex', label: '性别', align: 'center', visible: true, },
|
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
|
||||||
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, },
|
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
|
||||||
// { prop: 'ageUnit', label: '龄', align: 'center', visible: true, },
|
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
|
||||||
{ prop: 'orderItemName', label: '项目名称', align: 'center', visible: true, },
|
{ prop: 'sampleTypeName', label: '标本类型', align: 'center', visible: true, },
|
||||||
{ prop: 'sampleTypeName', label: '标本类型名称', align: 'center', visible: true, },
|
{ prop: 'tubeName', label: '采集容器', align: 'center', visible: true, },
|
||||||
{ prop: 'Status', label: '状态', align: 'center', visible: true, },
|
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
|
||||||
|
{ prop: 'moveStateName', label: '流转状态', align: 'center', visible: true, },
|
||||||
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
||||||
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, },
|
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'signInUserName', label: '签收人', align: 'center', visible: true, },
|
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'signInTime', label: '签收时间', align: 'center', visible: true, },
|
|
||||||
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
|
|
||||||
])
|
])
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
height: '65vh', // 高度
|
height: '68vh', // 高度
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
// fit: true, // 列宽自适应
|
// fit: true, // 列宽自适应
|
||||||
})
|
})
|
||||||
@ -118,19 +126,87 @@ const pagination = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const ksdhFields = ref([
|
const ksdhFields = ref([
|
||||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||||
])
|
])
|
||||||
|
const barcodes = ref([])
|
||||||
|
const tableRefs = ref(null)
|
||||||
|
const handleSelectionChange = (val: any) => {
|
||||||
|
barcodes.value = val.map((item: any) => item.barcode)
|
||||||
|
}
|
||||||
|
//标本签收
|
||||||
|
const qsHandle = (val: number) => {
|
||||||
|
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
|
||||||
|
sampleSign({ status: val, barcode: barcodes.value }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const goThPage = () => {
|
||||||
|
router.push('/regional/circulation/bbth')
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetHandle = () => {
|
||||||
|
queryParams.value = {
|
||||||
|
pageSize: 50,
|
||||||
|
pageNum: 1,
|
||||||
|
}
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
|
console.log('page==>', page);
|
||||||
|
queryParams.value.pageNum = page.currentPage
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
|
queryParams.value.pageSize = page.pageSize
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
|
if (queryParams.value.times && queryParams.value.times.length > 0) {
|
||||||
|
queryParams.value.DateStart = queryParams.value.times[0]
|
||||||
|
queryParams.value.DateEnd = queryParams.value.times[1]
|
||||||
|
} else {
|
||||||
|
queryParams.value.DateStart = ''
|
||||||
|
queryParams.value.DateEnd = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
|
querySampleSign(queryParams.value).then((res: any) => {
|
||||||
|
tableData.value = res.rows
|
||||||
|
pagination.value.total = res.total
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// getList()
|
const hosList = ref([])
|
||||||
|
const regdictList: any = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
listhospital().then((res: any) => {
|
||||||
|
hosList.value = res.rows.map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.hospitalName,
|
||||||
|
value: item.hospitalCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
|
||||||
|
regdictList.value = res.rows;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const formatDict = (v: string, arr: Array<any>) => {
|
||||||
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -4,42 +4,42 @@
|
|||||||
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="委托机构:" prop="srcHospName">
|
<el-form-item label="委托机构:" prop="SrcHospName">
|
||||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="[]" label="label"
|
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
:size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构"
|
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
|
||||||
@getDataValue="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="条码号:" prop="barcode">
|
|
||||||
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="姓名:" prop="patName">
|
<el-form-item label="检测医院:" prop="DstHospName">
|
||||||
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
|
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="申请项目:" prop="OrderItemName">
|
<el-form-item label="条码号:" prop="Barcode">
|
||||||
<el-input v-model="queryParams.OrderItemName" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="标本状态:" prop="dybz">
|
<el-form-item label="姓名:" prop="PatName">
|
||||||
<el-select v-model="queryParams.dybz" placeholder="请选择" clearable @change="handleQuery">
|
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable />
|
||||||
<!-- <el-option label="已打印" value="1" />
|
</el-form-item>
|
||||||
<el-option label="未打印" value="0" /> -->
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="申请项目:" prop="checkPUR">
|
||||||
|
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="时间类型:" prop="DateType">
|
||||||
|
<el-select v-model="queryParams.DateType" placeholder="请选择">
|
||||||
|
<el-option label="登记时间" value="登记时间" />
|
||||||
|
<el-option label="采样时间" value="采样时间" />
|
||||||
|
<el-option label="送出时间" value="送出时间" />
|
||||||
|
<el-option label="签收时间" value="签收时间" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="采样人:" prop="affirmUserName">
|
|
||||||
<el-input v-model="queryParams.affirmUserName" placeholder="请输入采样人" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="日期:" prop="times">
|
<el-form-item label="日期:" prop="times">
|
||||||
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
|
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
|
||||||
@ -47,56 +47,63 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary">查询</el-button>
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
<el-button>重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb10">
|
<div class="mb10">
|
||||||
<el-button type="primary">已核查</el-button>
|
<el-button type="primary" @click="thHandle(20)">重新采集</el-button>
|
||||||
<el-button type="primary">重新采集</el-button>
|
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
|
||||||
<el-button type="primary">撤销退回</el-button>
|
<el-button type="primary" @click="thHandle(90)">申请作废</el-button>
|
||||||
<el-popover placement="bottom">
|
|
||||||
<template #reference>
|
|
||||||
<el-button type="primary" plain>其他操作 <el-icon>
|
|
||||||
<ArrowDown />
|
|
||||||
</el-icon></el-button>
|
|
||||||
</template>
|
|
||||||
<div class="btns">
|
|
||||||
<el-button type="primary" plain>申请退费</el-button>
|
|
||||||
<el-button type="primary" plain>取消核查</el-button>
|
|
||||||
</div>
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
</div>
|
||||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination">
|
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||||
|
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
|
||||||
|
<template #patAge="{ row }">
|
||||||
|
{{ row.patAge }}{{ row.ageUnit }}
|
||||||
|
</template>
|
||||||
|
<template #status="{ row }">
|
||||||
|
{{ formatDict(row.status, regdictList) }}
|
||||||
|
</template>
|
||||||
|
<template #patSex="{ row }">
|
||||||
|
{{ row.patSex == 1 ? '男' : '女' }}
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import { querySample } from '@/api/regional/index'
|
import { querySampleSignBack, sampleSign } from '@/api/regional/index'
|
||||||
import SelectTable from '@/components/SelectTable/index.vue';
|
import SelectTable from '@/components/SelectTable/index.vue';
|
||||||
import { classCom } from '@/utils/classCom';
|
import { classCom } from '@/utils/classCom';
|
||||||
|
// @ts-ignore
|
||||||
|
import { listhospital } from "@/api/regional/dict/hospital.js";
|
||||||
|
// @ts-ignore
|
||||||
|
import { listregdict } from "@/api/regional/dict/regdict.js";
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
const aotuSize = classCom.useAutoSize();
|
const aotuSize = classCom.useAutoSize();
|
||||||
|
|
||||||
const queryParams: any = ref({})
|
const queryParams: any = ref({
|
||||||
|
pageSize: 50,
|
||||||
|
pageNum: 1,
|
||||||
|
})
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const columns: any = ref([
|
const columns: any = ref([
|
||||||
{ type: 'selection', align: 'center', visible: true, },
|
{ type: 'selection', align: 'center', visible: true, },
|
||||||
{ prop: 'barcode', label: '处理状态', align: 'center', visible: true, },
|
{ prop: 'barcode', label: '处理状态', align: 'center', visible: true, },
|
||||||
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
||||||
{ prop: 'patName', label: '姓名', align: 'center', visible: true, },
|
{ prop: 'patName', label: '姓名', align: 'center', visible: true, },
|
||||||
{ prop: 'patSex', label: '性别', align: 'center', visible: true, },
|
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
|
||||||
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, },
|
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
|
||||||
// { prop: 'ageUnit', label: '龄', align: 'center', visible: true, },
|
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, },
|
||||||
{ prop: 'orderItemName', label: '项目名称', align: 'center', visible: true, },
|
|
||||||
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, },
|
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, },
|
||||||
{ prop: 'srcHospName', label: '检测机构', align: 'center', visible: true, },
|
{ prop: 'srcHospName', label: '检测机构', align: 'center', visible: true, },
|
||||||
{ prop: 'Status', label: '标本状态', align: 'center', visible: true, },
|
{ prop: 'Status', label: '标本状态', align: 'center', visible: true, slot: "status" },
|
||||||
{ prop: 'affirmUserName', label: '退回理由', align: 'center', visible: true, },
|
{ prop: '', label: '退回理由', align: 'center', visible: true, },
|
||||||
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, },
|
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, },
|
||||||
{ prop: 'signInUserName', label: '操作人', align: 'center', visible: true, },
|
{ prop: 'signInUserName', label: '操作人', align: 'center', visible: true, },
|
||||||
{ prop: 'signInTime', label: '操作时间', align: 'center', visible: true, },
|
{ prop: 'signInTime', label: '操作时间', align: 'center', visible: true, },
|
||||||
@ -104,7 +111,7 @@ const columns: any = ref([
|
|||||||
])
|
])
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
height: '65vh', // 高度
|
height: '68vh', // 高度
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
// fit: true, // 列宽自适应
|
// fit: true, // 列宽自适应
|
||||||
})
|
})
|
||||||
@ -117,19 +124,80 @@ const pagination = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const ksdhFields = ref([
|
const ksdhFields = ref([
|
||||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||||
])
|
])
|
||||||
|
const barcodes = ref([])
|
||||||
|
const tableRefs = ref(null)
|
||||||
|
|
||||||
|
const thHandle = (val: number) => {
|
||||||
|
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
|
||||||
|
sampleSign({ status: val, barcode: barcodes.value }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('标本签收成功!')
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleSelectionChange = (val: any) => {
|
||||||
|
barcodes.value = val.map((item: any) => item.barcode)
|
||||||
|
}
|
||||||
|
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
|
queryParams.value.pageNum = page.currentPage
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
|
queryParams.value.pageSize = page.pageSize
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
|
if (queryParams.value.times && queryParams.value.times.length > 0) {
|
||||||
|
queryParams.value.DateStart = queryParams.value.times[0]
|
||||||
|
queryParams.value.DateEnd = queryParams.value.times[1]
|
||||||
|
} else {
|
||||||
|
queryParams.value.DateStart = ''
|
||||||
|
queryParams.value.DateEnd = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const resetHandle = () => {
|
||||||
|
queryParams.value = {
|
||||||
|
pageSize: 50,
|
||||||
|
pageNum: 1,
|
||||||
|
}
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
|
querySampleSignBack(queryParams.value).then((res: any) => {
|
||||||
|
tableData.value = res.rows
|
||||||
|
pagination.value.total = res.total
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// getList()
|
const hosList = ref([])
|
||||||
|
const regdictList: any = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
listhospital().then((res: any) => {
|
||||||
|
hosList.value = res.rows.map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.hospitalName,
|
||||||
|
value: item.hospitalCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
|
||||||
|
regdictList.value = res.rows;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const formatDict = (v: string, arr: Array<any>) => {
|
||||||
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -1,139 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<div class="compact-form">
|
|
||||||
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="委托机构:" prop="srcHospName">
|
|
||||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
|
||||||
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择委托机构"
|
|
||||||
@getDataValue="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="条码号:" prop="barcode">
|
|
||||||
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="姓名:" prop="patName">
|
|
||||||
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="申请项目:" prop="OrderItemName">
|
|
||||||
<el-input v-model="queryParams.OrderItemName" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="标本状态:" prop="dybz">
|
|
||||||
<el-select v-model="queryParams.dybz" placeholder="请选择" clearable @change="handleQuery">
|
|
||||||
<!-- <el-option label="已打印" value="1" />
|
|
||||||
<el-option label="未打印" value="0" /> -->
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="采样人:" prop="affirmUserName">
|
|
||||||
<el-input v-model="queryParams.affirmUserName" placeholder="请输入采样人" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="日期:" prop="times">
|
|
||||||
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
|
|
||||||
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button type="primary">查询</el-button>
|
|
||||||
<el-button>重置</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div></div>
|
|
||||||
|
|
||||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination">
|
|
||||||
</CustomTable>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
|
||||||
import { querySample } from '@/api/regional/index'
|
|
||||||
// @ts-ignore
|
|
||||||
import { listhospital } from "@/api/regional/dict/hospital.js";
|
|
||||||
import SelectTable from '@/components/SelectTable/index.vue';
|
|
||||||
import { classCom } from '@/utils/classCom';
|
|
||||||
const aotuSize = classCom.useAutoSize();
|
|
||||||
|
|
||||||
const queryParams: any = ref({})
|
|
||||||
const tableData: any = ref([])
|
|
||||||
const columns: any = ref([
|
|
||||||
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
|
||||||
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, },
|
|
||||||
{ prop: 'patName', label: '姓名', align: 'center', visible: true, },
|
|
||||||
{ prop: 'patSex', label: '性别', align: 'center', visible: true, },
|
|
||||||
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, },
|
|
||||||
// { prop: 'ageUnit', label: '龄', align: 'center', visible: true, },
|
|
||||||
{ prop: 'orderItemName', label: '项目名称', align: 'center', visible: true, },
|
|
||||||
{ prop: 'sampleTypeName', label: '标本类型名称', align: 'center', visible: true, },
|
|
||||||
{ prop: 'Status', label: '状态', align: 'center', visible: true, },
|
|
||||||
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
|
||||||
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, },
|
|
||||||
{ prop: 'signInUserName', label: '签收人', align: 'center', visible: true, },
|
|
||||||
{ prop: 'signInTime', label: '签收时间', align: 'center', visible: true, },
|
|
||||||
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
|
|
||||||
])
|
|
||||||
const tableConfig = ref({
|
|
||||||
border: true, // 边框
|
|
||||||
height: '70vh', // 高度
|
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
|
||||||
// fit: true, // 列宽自适应
|
|
||||||
})
|
|
||||||
|
|
||||||
const pagination = ref({
|
|
||||||
show: true,
|
|
||||||
total: 0,
|
|
||||||
pageSize: 50,
|
|
||||||
currentPage: 1,
|
|
||||||
})
|
|
||||||
|
|
||||||
const ksdhFields = ref([
|
|
||||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
|
||||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const handleQuery = () => {
|
|
||||||
}
|
|
||||||
|
|
||||||
const getList = () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
const hosList = ref([])
|
|
||||||
onMounted(() => {
|
|
||||||
getList()
|
|
||||||
listhospital().then((res: any) => {
|
|
||||||
hosList.value = res.rows.map((item: any) => {
|
|
||||||
return {
|
|
||||||
label: item.hospitalName,
|
|
||||||
value: item.hospitalCode
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// getList()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.compact-form {
|
|
||||||
.el-form-item {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
543
src/views/regional/circulation/mzcy/index.vue
Normal file
543
src/views/regional/circulation/mzcy/index.vue
Normal file
@ -0,0 +1,543 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-position="left">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-form-item label="" label-width="0px" prop="brdh">
|
||||||
|
<el-col :span="6">
|
||||||
|
<div> 就诊卡号/病历号/磁卡号: </div>
|
||||||
|
<el-input v-model="queryParams.brdh" placeholder="就诊卡号/病历号/磁卡号" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-radio-group v-model="queryParams.zt" size="default">
|
||||||
|
<el-radio v-for="(item, index) in showconfirmOptions" :key="index" :label="item.value"
|
||||||
|
:disabled="item.disabled">{{ item.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1">
|
||||||
|
<div> 申请获取期限: </div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
|
||||||
|
<el-radio-group v-model="queryParams.subday" size="default">
|
||||||
|
<el-radio v-for="(item, index) in subdayOptions" :key="index" :label="item.value"
|
||||||
|
:disabled="item.disabled">{{ item.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-select v-model="queryParams.cardtype" placeholder="卡类型" clearable :style="{ width: '100%' }">
|
||||||
|
<el-option v-for="(item, index) in cardtypeOptions" :key="index" :label="item.label" :value="item.value"
|
||||||
|
:disabled="item.disabled"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button type="primary" icon="Search" @click="readCard">读卡</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<PatSearchDialog @select="handlePatientSelect" />
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="5" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="Printer" :disabled="single" @click="printAll">打印</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="Printer" :disabled="single" @click="printSigne">单打条码</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="Printer" :disabled="freesingle" @click="printBack">单打回单</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="Delete" @click="cancel">取消采样</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="5" class="table-container">
|
||||||
|
<el-table ref="tableRef" :data="reqmainList" @selection-change="handleSelectionChange" @select="handleSelect"
|
||||||
|
height="100%" :cell-style="tableCellStyle">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="sqxmmc" width="200" show-overflow-tooltip />
|
||||||
|
<el-table-column label="项目代码" align="center" prop="sqxmdh" width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column label="项目类别" align="center" prop="cp_xmlb" />
|
||||||
|
<el-table-column label="样本类型" align="center" prop="yblx" />
|
||||||
|
<el-table-column label="条码号" align="center" prop="sqh" width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column label="申请时间" align="center" prop="sqsj" width="180" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.sqsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="病人姓名" align="center" prop="brxm" show-overflow-tooltip />
|
||||||
|
<el-table-column label="申请医生" align="center" prop="sqys" :formatter="formatDict('SRD')" show-overflow-tooltip />
|
||||||
|
<el-table-column label="序号" align="center" prop="xh" show-overflow-tooltip />
|
||||||
|
<el-table-column label="数量" align="center" prop="sl" show-overflow-tooltip />
|
||||||
|
<el-table-column label="单价" align="center" prop="dj" show-overflow-tooltip />
|
||||||
|
<el-table-column label="状态" align="center" prop="zt" show-overflow-tooltip />
|
||||||
|
<el-table-column label="计价" align="center" prop="jjzt">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-checkbox :model-value="scope.row.jjzt === '1'" disabled>
|
||||||
|
</el-checkbox>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="病人代号" align="center" prop="brdh" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注1" align="center" prop="detailBZ1" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注2" align="center" prop="detailBZ2" show-overflow-tooltip />
|
||||||
|
<el-table-column label="颜色" align="center" prop="cp_color" v-if="false" show-overflow-tooltip />
|
||||||
|
<el-table-column label="确认标识" align="center" prop="cp_cflag" v-if="false" show-overflow-tooltip />
|
||||||
|
<el-table-column label="科室" align="center" prop="ksdh" :formatter="formatDict('DP')" show-overflow-tooltip />
|
||||||
|
<el-table-column label="病人类型" align="center" prop="brly" :formatter="formatDict('PT')" show-overflow-tooltip />
|
||||||
|
<el-table-column label="性别" align="center" prop="brxb" :formatter="formatDict('SX')" show-overflow-tooltip />
|
||||||
|
<el-table-column label="生日" align="center" prop="brsr" width="180" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.brsr, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="床号" align="center" prop="ch" width="50" show-overflow-tooltip />
|
||||||
|
<el-table-column label="诊断" align="center" prop="zd" width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column label="条码类别" align="center" prop="bgddh" v-if="false" show-overflow-tooltip />
|
||||||
|
<el-table-column label="年龄" align="center" prop="nl" show-overflow-tooltip />
|
||||||
|
<el-table-column label="年龄单位" align="center" prop="nldw" :formatter="formatDict('AU')" show-overflow-tooltip />
|
||||||
|
<el-table-column label="采样时间" align="center" prop="cysj" width="180" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.cysj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-row>
|
||||||
|
<!-- 汇总行 -->
|
||||||
|
<div class="table-summary">
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">条码数:</span>
|
||||||
|
<span class="summary-value">{{ idsnew.length }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">项目数:</span>
|
||||||
|
<span class="summary-value">{{ totalRows }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">合计金额:</span>
|
||||||
|
<span class="summary-value">{{ totalPrice.toFixed(2) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
querySQD,
|
||||||
|
queryPatList,
|
||||||
|
printBackpaper,
|
||||||
|
printBarcodeall
|
||||||
|
} from "@/api/mzcx/cydj.js";
|
||||||
|
import { querySample } from '@/api/regional/index'
|
||||||
|
import PatSearchDialog from '../../../mzcx/cydj/components/OutPatList.vue'
|
||||||
|
// import PatSearchDialog from './components/OutPatList.vue'
|
||||||
|
import { classCom } from '@/utils/classCom';
|
||||||
|
const comDict = inject('comDict');
|
||||||
|
// 字典数据存储
|
||||||
|
const dictData = ref({});
|
||||||
|
const tableRef = ref(null);
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
// 选中的行
|
||||||
|
const selectedRows = ref([]);
|
||||||
|
const reqmainList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref([]);
|
||||||
|
// 新增:计算属性,返回去重后的ids数组
|
||||||
|
const idsnew = computed(() => {
|
||||||
|
return [...new Set(ids.value)];
|
||||||
|
});
|
||||||
|
const single = ref(true);
|
||||||
|
const freesingle = ref(true);
|
||||||
|
const cardtypeOptions = ref([{ "label": "就诊卡", "value": 1 }, { "label": "医保卡", "value": 2 }, { "label": "电子医保卡", "value": 3 }, { "label": "身份证", "value": 4 }])
|
||||||
|
const showconfirmOptions = ref([{ "label": "未打印", "value": 1 }, { "label": "已打印", "value": 11 }])
|
||||||
|
const subdayOptions = ref([{ "label": "1天", "value": 1 }, { "label": "3天", "value": 3 }, { "label": "1周", "value": 7 }, { "label": "2周", "value": 14 }, { "label": "1月", "value": 30 }, { "label": "3月", "value": 90 }, { "label": "1年", "value": 365 }, { "label": "2年", "value": 730 }])
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
brdh: null,
|
||||||
|
stime: null,
|
||||||
|
etime: null,
|
||||||
|
klx: null,
|
||||||
|
zt: 1,
|
||||||
|
subday: 3000,
|
||||||
|
cardtype: null,
|
||||||
|
Status: '10'
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
brdh: [
|
||||||
|
{ required: true, message: "病人代码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
subday: [],
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
// 标志位:是否是程序自动勾选(避免循环触发事件)
|
||||||
|
const isAutoSelect = ref(false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听单选勾选/取消事件
|
||||||
|
* @param {Array} selection 目前已选中的行
|
||||||
|
* @param {Object} row 当前操作的行数据
|
||||||
|
* @param {Boolean} selected 是否勾选(true=勾选,false=取消)
|
||||||
|
*/
|
||||||
|
const handleSelect = (selection, row, selected) => {
|
||||||
|
if (isAutoSelect.value) return;
|
||||||
|
|
||||||
|
const targetSqh = row.sqh;
|
||||||
|
const targetxh = row.xh;
|
||||||
|
if (!targetSqh) return;
|
||||||
|
|
||||||
|
// 先收集需要自动勾选的行(避免在循环中修改数据)
|
||||||
|
const rowsToSelect = reqmainList.value.filter(
|
||||||
|
item => item.sqh === targetSqh && item.xh !== targetxh
|
||||||
|
);
|
||||||
|
|
||||||
|
// 如果有需要自动勾选的行,才开启标志位
|
||||||
|
if (rowsToSelect.length > 0) {
|
||||||
|
|
||||||
|
rowsToSelect.forEach(item => {
|
||||||
|
tableRef.value.toggleRowSelection(item, selected);
|
||||||
|
isAutoSelect.value = true;
|
||||||
|
});
|
||||||
|
setTimeout(() => isAutoSelect.value = false, 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 字典格式化方法
|
||||||
|
const formatDict = (dictType) => {
|
||||||
|
return (row, column, value) => {
|
||||||
|
// 从全局字典中获取映射值
|
||||||
|
return dictData.value[dictType].find(item => String(item.value) === String(value).trim())?.label || value;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
// 定义“空数据”的判断函数
|
||||||
|
const isEmptyData = (data) => {
|
||||||
|
// 处理 null/undefined
|
||||||
|
if (data === null || data === undefined) return true;
|
||||||
|
// 处理空数组
|
||||||
|
if (Array.isArray(data) && data.length === 0) return true;
|
||||||
|
// 处理空对象(无任何属性)
|
||||||
|
if (typeof data === 'object' && Object.keys(data).length === 0) return true;
|
||||||
|
// 处理空字符串
|
||||||
|
if (typeof data === 'string' && data.trim() === '') return true;
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 获取指定天数偏移后的日期时间字符串
|
||||||
|
* @param {number} days 偏移天数(正数表示未来,负数表示过去)
|
||||||
|
* @returns {string} 格式化的日期时间字符串 'yyyy-mm-dd HH:MM:SS'
|
||||||
|
*/
|
||||||
|
function getDateOffset(days) {
|
||||||
|
const now = new Date();
|
||||||
|
const offsetTimestamp = now.getTime() + days * 24 * 60 * 60 * 1000;
|
||||||
|
const targetDate = new Date(offsetTimestamp);
|
||||||
|
|
||||||
|
const year = targetDate.getFullYear();
|
||||||
|
const month = String(targetDate.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(targetDate.getDate()).padStart(2, '0');
|
||||||
|
// const hours = String(targetDate.getHours()).padStart(2, '0');
|
||||||
|
// const minutes = String(targetDate.getMinutes()).padStart(2, '0');
|
||||||
|
//const seconds = String(targetDate.getSeconds()).padStart(2, '0');
|
||||||
|
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
|
return `${year}-${month}-${day} 00:00:00`;
|
||||||
|
}
|
||||||
|
function getSubday() {
|
||||||
|
const days = 0 - queryParams.value.subday;
|
||||||
|
queryParams.value.stime = getDateOffset(days);
|
||||||
|
queryParams.value.etime = getDateOffset(1);
|
||||||
|
}
|
||||||
|
/** 查询采样登记列表 */
|
||||||
|
function getList() {
|
||||||
|
freesingle.value = true;
|
||||||
|
if (isEmptyData(queryParams.value.brdh)) proxy.$modal.alert("请刷卡或输入门诊号!");
|
||||||
|
else {
|
||||||
|
loading.value = true;
|
||||||
|
getSubday();
|
||||||
|
querySample(queryParams.value).then(response => {
|
||||||
|
if (isEmptyData(response.data)) proxy.$modal.alert("没有检索的数据!");
|
||||||
|
reqmainList.value = response.data;
|
||||||
|
// console.log('response:', response.data);
|
||||||
|
loading.value = false;
|
||||||
|
single.value = false;
|
||||||
|
// 新增:数据加载完成后触发全选
|
||||||
|
// 延迟执行(确保DOM已更新)
|
||||||
|
setTimeout(() => {
|
||||||
|
if (tableRef.value) {
|
||||||
|
tableRef.value.toggleAllSelection(); // 调用全选方法
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
function cancel() {
|
||||||
|
// open.value = false;
|
||||||
|
// reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表单重置
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
sqh: null,
|
||||||
|
xh: null,
|
||||||
|
sqxmdh: null,
|
||||||
|
sqxmmc: null,
|
||||||
|
sl: null,
|
||||||
|
dj: null,
|
||||||
|
detailZT: null,
|
||||||
|
detailJJZT: null,
|
||||||
|
ksdh: null,
|
||||||
|
sqys: null,
|
||||||
|
sqsj: null,
|
||||||
|
jsys: null,
|
||||||
|
jssj: null,
|
||||||
|
brly: null,
|
||||||
|
brdh: null,
|
||||||
|
brxm: null,
|
||||||
|
zt: null,
|
||||||
|
jjzt: null,
|
||||||
|
brxb: null,
|
||||||
|
brsr: null,
|
||||||
|
jzbz: null,
|
||||||
|
cp_xmlb: null,
|
||||||
|
cp_color: null,
|
||||||
|
cp_cflag: null,
|
||||||
|
detailBZ1: null,
|
||||||
|
ch: null,
|
||||||
|
detailBZ2: null,
|
||||||
|
bz1: null,
|
||||||
|
bz2: null,
|
||||||
|
bz3: null,
|
||||||
|
yblx: null,
|
||||||
|
zxys: null,
|
||||||
|
zxsj: null,
|
||||||
|
bgddh: null,
|
||||||
|
nl: null,
|
||||||
|
nldw: null,
|
||||||
|
zd: null,
|
||||||
|
cysj: null
|
||||||
|
};
|
||||||
|
freesingle.value = false;
|
||||||
|
single.value = false;
|
||||||
|
proxy.resetForm("reqmainRef");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
function readCard() {
|
||||||
|
//getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 处理病人选择事件
|
||||||
|
const handlePatientSelect = (patient) => {
|
||||||
|
// console.log('选中的病人:', patient);
|
||||||
|
queryParams.value.brdh = patient
|
||||||
|
// 处理选中的病人数据
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
if (isAutoSelect.value) return;
|
||||||
|
selectedRows.value = selection;
|
||||||
|
ids.value = selection.map(item => item.sqh);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 打印选择 */
|
||||||
|
function printAll(row) {
|
||||||
|
printSigne();
|
||||||
|
printBack();
|
||||||
|
}
|
||||||
|
/** 单打条码*/
|
||||||
|
function printSigne(row) {
|
||||||
|
if (idsnew.value.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
printBarcodeall(idsnew.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("打印成功");
|
||||||
|
open.value = false;
|
||||||
|
freesingle.value = false;
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 打印回单 */
|
||||||
|
function printBack(row) {
|
||||||
|
if (idsnew.value.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//console.log('idsnew:', idsnew.value)
|
||||||
|
printBackpaper(idsnew.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("打印成功");
|
||||||
|
open.value = false;
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const totalRows = computed(() => {
|
||||||
|
return reqmainList.value.length || 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
const totalPrice = computed(() => {
|
||||||
|
return reqmainList.value.reduce((sum, row) => {
|
||||||
|
const price = parseFloat(row.dj) || 0;
|
||||||
|
return sum + price;
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 组件挂载时加载字典
|
||||||
|
onMounted(async () => {
|
||||||
|
// 加载病人来源字典
|
||||||
|
const dictRefs = await comDict('PT', 'DP', 'SRD', 'BT', 'SX', 'AU');
|
||||||
|
// 从 ref 中获取实际数据
|
||||||
|
dictData.value = {
|
||||||
|
PT: toRaw(dictRefs.PT.value) || [],
|
||||||
|
DP: toRaw(dictRefs.DP.value) || [],
|
||||||
|
SRD: toRaw(dictRefs.SRD.value) || [],
|
||||||
|
BT: toRaw(dictRefs.BT.value) || [],
|
||||||
|
SX: toRaw(dictRefs.SX.value) || [],
|
||||||
|
AU: toRaw(dictRefs.AU.value) || []
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表格单元格样式(仅作用于“项目类别”列)
|
||||||
|
const tableCellStyle = ({ row, column }) => {
|
||||||
|
// 只对“项目类别”列生效
|
||||||
|
if (column.label === '项目类别') {
|
||||||
|
// 1. 转换颜色(十进制→十六进制)
|
||||||
|
const bgColor = classCom.decimalToHexColor(row.cp_color);
|
||||||
|
// 2. 自动计算文字颜色(确保和背景色对比度足够)
|
||||||
|
const textColor = classCom.getContrastTextColor(bgColor);
|
||||||
|
|
||||||
|
return {
|
||||||
|
backgroundColor: bgColor, // 背景色(转换后的值)
|
||||||
|
color: textColor, // 文字色(自动适配)
|
||||||
|
textAlign: 'center', // 文字居中
|
||||||
|
fontWeight: '500' // 文字加粗(提升可读性)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {}; // 其他列保持默认样式
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.app-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 90vh;
|
||||||
|
/* 容器高度等于窗口高度 */
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact-form {
|
||||||
|
height: 75px;
|
||||||
|
/* 固定高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb8 {
|
||||||
|
height: 30px;
|
||||||
|
/* 固定高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-summary {
|
||||||
|
height: 10px;
|
||||||
|
/* 固定高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-container {
|
||||||
|
flex: 1;
|
||||||
|
/* 占满剩余高度 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 避免表格超出容器 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact-form .el-form-item {
|
||||||
|
padding: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact-form .el-form-item__label {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
max-height: 450px;
|
||||||
|
/* 设置最大高度 */
|
||||||
|
overflow-y: auto;
|
||||||
|
/* 超出高度时显示垂直滚动条 */
|
||||||
|
padding: 5px;
|
||||||
|
/* 保持与卡片默认一致的内边距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.clickable:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
/* 鼠标悬停时显示手型 */
|
||||||
|
transition: all 0.3s;
|
||||||
|
/* 平滑过渡效果 */
|
||||||
|
color: blue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 汇总行样式 */
|
||||||
|
.table-summary {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
padding: 6px 16px;
|
||||||
|
margin-top: 8px;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
/* 汇总行文字行高 */
|
||||||
|
.summary-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 24px;
|
||||||
|
|
||||||
|
.summary-label {
|
||||||
|
color: #606266;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-value {
|
||||||
|
color: #303133;
|
||||||
|
min-width: 40px;
|
||||||
|
text-align: left;
|
||||||
|
/* 核心:数值左对齐 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 单独设置"单价合计"的值为红色 */
|
||||||
|
&:nth-child(3) .summary-value {
|
||||||
|
color: #f56c6c;
|
||||||
|
/* Element UI 红色主题色 */
|
||||||
|
font-weight: 600;
|
||||||
|
/* 可选:加粗字体 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -4,41 +4,45 @@
|
|||||||
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="委托机构:" prop="srcHospName">
|
<el-form-item label="委托机构:" prop="SrcHospName">
|
||||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="[]" label="label"
|
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
:size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构"
|
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
|
||||||
@getDataValue="handleQuery" />
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="检测医院:" prop="DstHospName">
|
||||||
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
|
||||||
|
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="条码号:" prop="barcode">
|
<el-form-item label="条码号:" prop="Barcode">
|
||||||
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="姓名:" prop="patName">
|
<el-form-item label="姓名:" prop="PatName">
|
||||||
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="申请项目:" prop="OrderItemName">
|
<el-form-item label="申请项目:" prop="checkPUR">
|
||||||
<el-input v-model="queryParams.OrderItemName" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="标本状态:" prop="dybz">
|
<el-form-item label="时间类型:" prop="DateType">
|
||||||
<el-select v-model="queryParams.dybz" placeholder="请选择" clearable @change="handleQuery">
|
<el-select v-model="queryParams.DateType" placeholder="请选择">
|
||||||
<!-- <el-option label="已打印" value="1" />
|
<el-option label="登记时间" value="登记时间" />
|
||||||
<el-option label="未打印" value="0" /> -->
|
<el-option label="采样时间" value="采样时间" />
|
||||||
|
<el-option label="送出时间" value="送出时间" />
|
||||||
|
<el-option label="签收时间" value="签收时间" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
|
||||||
<el-form-item label="采样人:" prop="affirmUserName">
|
|
||||||
<el-input v-model="queryParams.affirmUserName" placeholder="请输入采样人" clearable @change="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="日期:" prop="times">
|
<el-form-item label="日期:" prop="times">
|
||||||
@ -47,31 +51,35 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary">查询</el-button>
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
<el-button>重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb10">
|
<div class="cz_box">
|
||||||
<el-button type="primary">标本签收</el-button>
|
<el-row :gutter="10">
|
||||||
<el-button type="primary">标本拒签</el-button>
|
<el-col :span="1.5"> 送检医院:</el-col>
|
||||||
<el-popover placement="bottom">
|
<el-col :span="3">
|
||||||
<template #reference>
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList" label="label"
|
||||||
<el-button type="primary" plain>其他操作 <el-icon>
|
:size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
||||||
<ArrowDown />
|
</el-col>
|
||||||
</el-icon></el-button>
|
<el-col :span="1.5"> <el-button type="primary">标本送检</el-button></el-col>
|
||||||
</template>
|
<el-col :span="1.5"> <el-button type="primary">取消送检</el-button></el-col>
|
||||||
<div class="btns">
|
</el-row>
|
||||||
<el-button type="primary" plain>标本退回</el-button>
|
|
||||||
<el-button type="primary" plain>更换条码</el-button>
|
|
||||||
<el-button type="primary" plain>取消签收</el-button>
|
|
||||||
</div>
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination">
|
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination">
|
||||||
|
<template #patAge="{ row }">
|
||||||
|
{{ row.patAge }}{{ row.ageUnit }}
|
||||||
|
</template>
|
||||||
|
<template #status="{ row }">
|
||||||
|
{{ formatDict(row.status, regdictList) }}
|
||||||
|
</template>
|
||||||
|
<template #patSex="{ row }">
|
||||||
|
{{ row.patSex == 1 ? '男' : '女' }}
|
||||||
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -80,30 +88,38 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import { querySample } from '@/api/regional/index'
|
import { querySample } from '@/api/regional/index'
|
||||||
|
// @ts-ignore
|
||||||
|
import { listhospital } from "@/api/regional/dict/hospital.js";
|
||||||
|
// @ts-ignore
|
||||||
|
import { listregdict } from "@/api/regional/dict/regdict.js";
|
||||||
import SelectTable from '@/components/SelectTable/index.vue';
|
import SelectTable from '@/components/SelectTable/index.vue';
|
||||||
import { classCom } from '@/utils/classCom';
|
import { classCom } from '@/utils/classCom';
|
||||||
const aotuSize = classCom.useAutoSize();
|
const aotuSize = classCom.useAutoSize();
|
||||||
|
|
||||||
const queryParams: any = ref({})
|
const queryParams: any = ref({
|
||||||
|
pageSize: 50,
|
||||||
|
pageNum: 1,
|
||||||
|
Status: '30'
|
||||||
|
})
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const columns: any = ref([
|
const columns: any = ref([
|
||||||
{ type: 'selection', align: 'center', visible: true, },
|
{ type: 'selection', align: 'center', visible: true, },
|
||||||
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
||||||
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, },
|
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
|
||||||
{ prop: 'patName', label: '姓名', align: 'center', visible: true, },
|
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 60 },
|
||||||
{ prop: 'patSex', label: '性别', align: 'center', visible: true, },
|
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
|
||||||
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, },
|
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
|
||||||
// { prop: 'ageUnit', label: '龄', align: 'center', visible: true, },
|
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
|
||||||
{ prop: 'orderItemName', label: '项目名称', align: 'center', visible: true, },
|
|
||||||
{ prop: 'sampleTypeName', label: '标本类型名称', align: 'center', visible: true, },
|
{ prop: 'sampleTypeName', label: '标本类型名称', align: 'center', visible: true, },
|
||||||
{ prop: 'Status', label: '状态', align: 'center', visible: true, },
|
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
|
||||||
{ prop: 'affirmUserName', label: '送检人', align: 'center', visible: true, },
|
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
||||||
|
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
|
||||||
{ prop: 'affirmTime', label: '送检时间', align: 'center', visible: true, },
|
{ prop: 'affirmTime', label: '送检时间', align: 'center', visible: true, },
|
||||||
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
|
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
|
||||||
])
|
])
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
height: '65vh', // 高度
|
height: '70vh', // 高度
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
// fit: true, // 列宽自适应
|
// fit: true, // 列宽自适应
|
||||||
})
|
})
|
||||||
@ -121,14 +137,66 @@ const ksdhFields = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
const barcodes = ref([])
|
||||||
|
const handleSelectionChange = (val: any) => {
|
||||||
|
barcodes.value = val.map((item: any) => item.barcode)
|
||||||
|
}
|
||||||
|
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
|
queryParams.value.pageNum = page.currentPage
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
|
||||||
|
queryParams.value.pageSize = page.pageSize
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
}
|
if (queryParams.value.times && queryParams.value.times.length > 0) {
|
||||||
|
queryParams.value.DateStart = queryParams.value.times[0]
|
||||||
|
queryParams.value.DateEnd = queryParams.value.times[1]
|
||||||
|
} else {
|
||||||
|
queryParams.value.DateStart = ''
|
||||||
|
queryParams.value.DateEnd = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
const resetHandle = () => {
|
||||||
|
queryParams.value = {
|
||||||
|
pageSize: 50,
|
||||||
|
pageNum: 1,
|
||||||
|
Status: '30'
|
||||||
|
}
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
|
querySample(queryParams.value).then((res: any) => {
|
||||||
|
tableData.value = res.rows
|
||||||
|
pagination.value.total = res.total
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// getList()
|
const hosList = ref([])
|
||||||
|
const regdictList: any = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
listhospital().then((res: any) => {
|
||||||
|
hosList.value = res.rows.map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.hospitalName,
|
||||||
|
value: item.hospitalCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
|
||||||
|
regdictList.value = res.rows;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const formatDict = (v: string, arr: Array<any>) => {
|
||||||
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@ -149,4 +217,9 @@ const getList = () => {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cz_box {
|
||||||
|
padding: .3125rem 0;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
744
src/views/regional/circulation/zycy/index.vue
Normal file
744
src/views/regional/circulation/zycy/index.vue
Normal file
@ -0,0 +1,744 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container ">
|
||||||
|
<div ref="compactForm">
|
||||||
|
<el-row :gutter="10" class="compact-form" v-show="showSearch">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" :size="aotuSize" :rules="queryRules">
|
||||||
|
<el-form-item label="日期:" prop="failed1">
|
||||||
|
<el-date-picker v-model="queryParams.times" type="datetimerange" range-separator="-"
|
||||||
|
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss" @change="handletime" style="width: 25rem;" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="医疗机构:" prop="yljg">
|
||||||
|
<el-select v-model="queryParams.yljg" placeholder="请选择" style="width: 9.37rem;">
|
||||||
|
<el-option v-for="item in dictData.HOS" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="条码状态:" prop="zt">
|
||||||
|
<el-select v-model="queryParams.zt" placeholder="请选择" style="width: 6.25rem;">
|
||||||
|
<el-option v-for="item in dictData.ST" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="failed4">
|
||||||
|
<el-select v-model="queryParams.failed4" placeholder="请选择" style="width:8.75rem">
|
||||||
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="failed5">
|
||||||
|
<el-input v-model="queryParams.failed5" clearable placeholder="条件搜索" @keyup.enter="handleQuery"
|
||||||
|
@clear="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-button icon="search" type="primary" @click="handleQuery" :size="aotuSize"> 搜索 </el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery" :size="aotuSize">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="16" class="right-table">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" :size="aotuSize" plain icon="Plus" @click="printHandle">生成条码</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" :size="aotuSize" plain icon="Edit" @click="selectStatusRows">选中所有未打印</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" :size="aotuSize" plain @click="printPdf">打印</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="info" :size="aotuSize" plain icon="Upload" @click="openBlock('采样登记')">采样登记</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" :size="aotuSize" plain @click="openBlock('送检登记')">送检登记</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" :size="aotuSize" plain @click="goReport">报告查询</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" :size="aotuSize" plain @click="cancelHandle">条码作废</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" :size="aotuSize" plain>打印机设置</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" :size="aotuSize" plain>清单打印</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <right-toolbar v-model:showSearch="showSearch" @updateColumns="updateColumns" @queryTable="handleQuery"
|
||||||
|
:columns="columns"></right-toolbar> -->
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
|
||||||
|
@row-click="rowHandle" @selection-change="selectionChange" :enable-column-drag="true"
|
||||||
|
@column-drag-end="handleColumnDragEnd">
|
||||||
|
<template #dy="{ row }">
|
||||||
|
<svg-icon v-if="row.zt != 1" icon-class="lvgou" />
|
||||||
|
</template>
|
||||||
|
<template #srcHospName="{ row }">
|
||||||
|
武汉市汉阳区江堤街社区卫生服务中心
|
||||||
|
</template>
|
||||||
|
<template #jzbz="{ row }">
|
||||||
|
{{ row.jzbz == '1' ? '急' : '' }}
|
||||||
|
</template>
|
||||||
|
<template #jjzt="{ row }">
|
||||||
|
{{ row.jjzt == '1' ? '计价' : '无' }}
|
||||||
|
</template>
|
||||||
|
<template #brly="{ row }">
|
||||||
|
{{ formatDict(row.brly, 'PT') }}
|
||||||
|
</template>
|
||||||
|
<template #zt="{ row }">
|
||||||
|
{{ formatDict(row.zt.trim(), 'ST') }}
|
||||||
|
</template>
|
||||||
|
<template #yljg="{ row }">
|
||||||
|
{{ formatDict(row.yljg, 'HOS') }}
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" class="right-table">
|
||||||
|
<!-- <div class="title"> 项目 </div> -->
|
||||||
|
<el-button type="primary" plain class="mb8" :size="aotuSize">拆分选中项目</el-button>
|
||||||
|
<CustomTable :data="rightTableData" :columns="rightColumns" :config="rightTableConfig">
|
||||||
|
<template #jjzt="{ row }">
|
||||||
|
{{ row.jjzt == '1' ? '计价' : '无' }}
|
||||||
|
</template>
|
||||||
|
<template #zt="{ row }">
|
||||||
|
{{ formatDict(row.zt, 'ST') }}
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 样本流程 -->
|
||||||
|
<div class="time-line-box">
|
||||||
|
<div v-for="(item, i) in timelineItems" :key="i" class="time-line-item">
|
||||||
|
<div v-if="i != 0" class="timeline-connector">
|
||||||
|
<img class="timg" src="@/assets/images/yjt.png" alt="">
|
||||||
|
</div>
|
||||||
|
<div :class="['timeline-content', i > lastTimeIndex ? 'no_active' : '']">
|
||||||
|
<div :class="['index', lastTimeIndex == i ? 'active' : '']">{{ i + 1 }}</div>
|
||||||
|
<div class="timeline-title">{{ item.title }}</div>
|
||||||
|
<div class="timeline-time">{{ item.time }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 采样登记 -->
|
||||||
|
<el-dialog v-model="dialogVisible" :title="title" draggable :close-on-click-modal="false" width="70vw"
|
||||||
|
@close="closeDialog">
|
||||||
|
<div class="flex-between">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-input v-model="sqhText" clearable placeholder="条形码" @keyup.enter="sqdQuery" @clear="sqdQuery" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" @click="sqdQuery" plain>读取</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="delete">删除选中行</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="info" plain>打印</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- <el-button type="primary" plain>保存</el-button> -->
|
||||||
|
</div>
|
||||||
|
<CustomTable :data="cyTableData" :columns="cyColumns" :config="cyTableConfig">
|
||||||
|
<template #zt="{ row }">
|
||||||
|
{{ formatDict(row.zt, 'ST') }}
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, toRaw, computed, watch, nextTick, onMounted, } from 'vue';
|
||||||
|
import { HiprintPrinter } from '@/utils/hiprintPrinter';
|
||||||
|
import { classCom } from '@/utils/classCom';
|
||||||
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
import { usePrintStore } from '@/store/modules/printStore'
|
||||||
|
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain } from '@/api/checkCode/index'
|
||||||
|
const aotuSize = classCom.useAutoSize();
|
||||||
|
//@ts-ignore
|
||||||
|
import { comDict } from '@/utils/dict'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
const router = useRouter()
|
||||||
|
const printStore = usePrintStore();
|
||||||
|
const compactForm = ref<HTMLElement | null>(null);
|
||||||
|
const heightForm = ref(90);
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const title = ref('采样登记')
|
||||||
|
const sqhText = ref('')
|
||||||
|
const tableRef = ref()
|
||||||
|
interface QueryParams {
|
||||||
|
times: string[]; // 明确类型为字符串元组
|
||||||
|
yljg: string;
|
||||||
|
zt: string;
|
||||||
|
failed4: string;
|
||||||
|
failed5: string;
|
||||||
|
}
|
||||||
|
// 提交表单数据
|
||||||
|
const queryParams = reactive<QueryParams>({
|
||||||
|
times: ['2025-07-18 00:00:00', '2025-07-18 23:59:59'],
|
||||||
|
// times: [],
|
||||||
|
yljg: '1',
|
||||||
|
zt: '',
|
||||||
|
failed4: '',
|
||||||
|
failed5: '',
|
||||||
|
});
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const queryRef = ref()
|
||||||
|
// 定义校验规则
|
||||||
|
const queryRules = ref({
|
||||||
|
// clientId: [
|
||||||
|
// { required: true, message: '编号不能为空', trigger: 'blur' },
|
||||||
|
|
||||||
|
// ],
|
||||||
|
|
||||||
|
// failed3: [
|
||||||
|
// { required: true, message: '条码状态不能为空', trigger: 'change' },
|
||||||
|
// ],
|
||||||
|
})
|
||||||
|
const options = [
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '通过姓名搜索',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '通过病人号搜索',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
label: '通过床号搜索',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
interface DictData {
|
||||||
|
SX?: Array<any>;
|
||||||
|
HOS?: Array<any>;
|
||||||
|
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||||
|
}
|
||||||
|
// 字典数据存储
|
||||||
|
const dictData = ref<DictData>({});
|
||||||
|
const handleQuery = async () => {
|
||||||
|
const valid = await queryRef.value.validate().catch(() => { });
|
||||||
|
if (!valid) return false;
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
// 重置
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryRef.value?.resetFields();
|
||||||
|
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const loading = ref(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 数据源
|
||||||
|
const tableData = ref([])
|
||||||
|
// 配置项
|
||||||
|
const columns = ref([
|
||||||
|
{ type: 'selection', visible: true, align: 'center', width: 35, label: '多选框' },
|
||||||
|
{ prop: 'srcHospName', label: '委托机构', visible: true, align: 'center', width: 200, slot: 'srcHospName' },
|
||||||
|
{ prop: 'zt', label: '打印', visible: true, align: 'center', slot: 'dy', width: 40 },
|
||||||
|
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 30 },
|
||||||
|
{ prop: 'ch', label: '床号', visible: true, align: 'center', width: 40 },//sortable: true,
|
||||||
|
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, width: 50 },
|
||||||
|
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 30 },
|
||||||
|
{ prop: 'jymd', label: '项目名称', visible: true, width: 130 },
|
||||||
|
{ prop: 'bgddhname', label: '类别', align: 'center', visible: true, width: 80 },
|
||||||
|
{ prop: 'sampletips', label: '采样提示', align: 'center', visible: true, width: 60 },
|
||||||
|
{ prop: 'yblx', label: '样本类型', align: 'center', visible: true, width: 60 },
|
||||||
|
{ prop: 'brdh', label: '病人号', align: 'center', visible: true, width: 90 },
|
||||||
|
{ prop: 'ksname', label: '科室名称', align: 'center', visible: true, width: 100 },
|
||||||
|
{ prop: 'sqh', label: '申请号/条码', align: 'center', visible: true, width: 100 },
|
||||||
|
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt', width: 40 },
|
||||||
|
{ prop: 'brly', label: '病人来源', align: 'center', visible: true, slot: 'brly', width: 60 },
|
||||||
|
{ prop: 'sqysname', label: '申请医生', align: 'center', visible: true, width: 60 },
|
||||||
|
{ prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 150 },
|
||||||
|
{ prop: 'jjzt', label: '计价标志', align: 'center', visible: true, slot: 'jjzt', width: 60 },
|
||||||
|
{ prop: 'zxysname', label: '执行医生', align: 'center', visible: true, width: 60 },
|
||||||
|
{ prop: 'bbsjrname', label: '送检人', align: 'center', visible: true, width: 50 },
|
||||||
|
{ prop: 'yljg', label: '检验机构', align: 'center', visible: true, slot: 'yljg', width: 150 },
|
||||||
|
])
|
||||||
|
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const sqhs = ref([]);
|
||||||
|
// 单元格样式
|
||||||
|
const cellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||||
|
row: any;
|
||||||
|
column: any;
|
||||||
|
rowIndex: number;
|
||||||
|
columnIndex: number;
|
||||||
|
}) => {
|
||||||
|
// console.log(row, column, rowIndex, columnIndex);
|
||||||
|
if (column.label == "急" && row.jzbz == "1") {
|
||||||
|
return { color: '#f00' };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (column.label == "类别") {
|
||||||
|
const bgColor = classCom.decimalToHexColor(row.bkcolor);
|
||||||
|
const textColor = classCom.getContrastTextColor(bgColor);
|
||||||
|
return {
|
||||||
|
backgroundColor: `${bgColor} !important`,
|
||||||
|
color: textColor,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const rowClassNameHd = ({ row, rowIndex }: {
|
||||||
|
row: any;
|
||||||
|
rowIndex: number;
|
||||||
|
}) => {
|
||||||
|
return 'custom-row-class'; // 返回自定义类名
|
||||||
|
};
|
||||||
|
|
||||||
|
// 时间线数据
|
||||||
|
const timelineItems = ref(
|
||||||
|
[
|
||||||
|
{ title: '检验申请', time: '' },
|
||||||
|
{ title: '标本采集', time: '' },
|
||||||
|
{ title: '上机检验', time: '' },
|
||||||
|
{ title: '标本送检', time: '' },
|
||||||
|
// { title: '检验接收', time: '' },
|
||||||
|
{ title: '标本签收', time: '' },
|
||||||
|
{ title: '结果审核', time: '' },
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// 计算最后一个有时间的节点索引
|
||||||
|
const lastTimeIndex = computed(() => {
|
||||||
|
|
||||||
|
const lastIndex = timelineItems.value.findLastIndex(item => item.time);
|
||||||
|
if (lastIndex === -1) {
|
||||||
|
return -1
|
||||||
|
} else {
|
||||||
|
return lastIndex;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 点击行
|
||||||
|
const rowHandle = (row: any) => {
|
||||||
|
timelineItems.value =
|
||||||
|
[
|
||||||
|
{ title: '检验申请', time: row.sqsj },
|
||||||
|
{ title: '标本采集', time: row.cysj },
|
||||||
|
{ title: '上机检验', time: row.zxsj },
|
||||||
|
{ title: '标本送检', time: row.bbsjsj },
|
||||||
|
// { title: '检验接收', time: row.jssj},
|
||||||
|
{ title: '标本签收', time: row.jssj },
|
||||||
|
{ title: '结果审核', time: row.confirmtime },
|
||||||
|
]
|
||||||
|
getRightTable(row)
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectionChange = (selection: any) => {
|
||||||
|
sqhs.value = selection;
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleColumnDragEnd = (data: any) => {
|
||||||
|
// 更新列配置
|
||||||
|
columns.value = data.columns;
|
||||||
|
// 可以在这里保存列顺序到本地存储等
|
||||||
|
// localStorage.setItem('tableColumnOrder', JSON.stringify(data.columns));
|
||||||
|
};
|
||||||
|
|
||||||
|
// 左侧表格配置
|
||||||
|
const tableConfig = ref({
|
||||||
|
// stripe: true, // 斑马纹
|
||||||
|
border: true, // 边框
|
||||||
|
index: true, // 序号
|
||||||
|
height: '', // 高度
|
||||||
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
|
cellStyle: cellStyleHd,
|
||||||
|
rowClassName: rowClassNameHd,
|
||||||
|
fit: true
|
||||||
|
})
|
||||||
|
// 右侧数据源
|
||||||
|
const rightTableData = ref([])
|
||||||
|
// 配置项
|
||||||
|
const rightColumns = ref([
|
||||||
|
{ prop: 'sqxmdh', label: '项目代号', visible: true, sortable: true, width: '110px' },
|
||||||
|
{ prop: 'sqxmmc', label: '项目名称', visible: true, width: '120px' },
|
||||||
|
{ prop: 'dj', label: '单价', align: 'center', visible: true, },
|
||||||
|
{ prop: 'sl', label: '数量', align: 'center', visible: true, },
|
||||||
|
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt', },
|
||||||
|
{ prop: 'jjzt', label: '计价标志', align: 'center', visible: true, slot: 'jjzt', },
|
||||||
|
|
||||||
|
])
|
||||||
|
// 表格配置
|
||||||
|
const rightTableConfig = ref({
|
||||||
|
// stripe: true, // 斑马纹
|
||||||
|
border: true, // 边框
|
||||||
|
height: '', // 高度
|
||||||
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
|
})
|
||||||
|
|
||||||
|
// 采样数据源
|
||||||
|
const cyTableData = ref([])
|
||||||
|
// 配置项
|
||||||
|
const cyColumns = ref([
|
||||||
|
{ prop: 'sqh', label: '申请号/条形码', align: 'center', visible: true, sortable: true, width: 140 },
|
||||||
|
{ prop: 'ksdh', label: '科室病区', align: 'center', visible: true, width: 120 },
|
||||||
|
{ prop: 'ch', label: '床号', align: 'center', visible: true, sortable: true, },
|
||||||
|
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, },
|
||||||
|
{ prop: 'brdh', label: '病人号', align: 'center', visible: true, },
|
||||||
|
{ prop: 'brxb', label: '性别', align: 'center', visible: true, },
|
||||||
|
{ prop: 'yblx', label: '样本类型', align: 'center', visible: true, },
|
||||||
|
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt', },
|
||||||
|
{ prop: 'jzbz', label: '急诊', align: 'center', visible: true, },
|
||||||
|
{ prop: 'jjzt', label: '采样人', align: 'center', visible: true, },
|
||||||
|
{ prop: 'cysj', label: '采样时间', align: 'center', visible: true, },
|
||||||
|
{ prop: 'zxysname', label: '执行医生', align: 'center', visible: true, },
|
||||||
|
{ prop: 'zxsj', label: '执行时间', align: 'center', visible: true, },
|
||||||
|
])
|
||||||
|
// 表格配置
|
||||||
|
const cyTableConfig = ref({
|
||||||
|
border: true, // 边框
|
||||||
|
height: '100%', // 高度
|
||||||
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 采样登记
|
||||||
|
const openBlock = (value: string) => {
|
||||||
|
if (sqhs.value.length > 0) {
|
||||||
|
ElMessageBox.confirm(`确定操作选中的数据吗?`, "提示", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === "confirm") {
|
||||||
|
// 生成请求Promise数组
|
||||||
|
const requests = sqhs.value.map((item: any) => { return item.sqh });
|
||||||
|
fetchCodeExec({
|
||||||
|
sqh: requests.join(','),
|
||||||
|
userid: 'lis',
|
||||||
|
status: value == '采样登记' ? 12 : 13,
|
||||||
|
yljg: 1
|
||||||
|
}).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('调用成功');
|
||||||
|
done();
|
||||||
|
getList()
|
||||||
|
} else {
|
||||||
|
ElMessage.error('调用失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}).catch(() => { });
|
||||||
|
|
||||||
|
} else {
|
||||||
|
title.value = value
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 采样读取
|
||||||
|
const sqdQuery = () => {
|
||||||
|
const index = cyTableData.value.findIndex((item: any) => item.sqh == sqhText.value)
|
||||||
|
if (index !== -1) return ElMessage.warning('该申请单数据已存在!')
|
||||||
|
|
||||||
|
fetchCodeReqmain({ sqh: sqhText.value }).then((res: any) => {
|
||||||
|
if (res.code == 0 && res.data.sqh) {
|
||||||
|
fetchCodeExec({
|
||||||
|
sqh: res.data.sqh,
|
||||||
|
userid: 'lis',
|
||||||
|
status: 12,
|
||||||
|
yljg: 1
|
||||||
|
})
|
||||||
|
cyTableData.value = cyTableData.value.concat(res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 关闭弹窗清空
|
||||||
|
const closeDialog = () => {
|
||||||
|
cyTableData.value = []
|
||||||
|
sqhText.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
interface ColumnItem {
|
||||||
|
prop: string;
|
||||||
|
label: string;
|
||||||
|
visible: boolean;
|
||||||
|
key: number;
|
||||||
|
align: string;
|
||||||
|
slot: string;
|
||||||
|
width: string;
|
||||||
|
}
|
||||||
|
// 更新列
|
||||||
|
// const updateColumns = (arr: Array<ColumnItem>) => {
|
||||||
|
// columns.value = arr
|
||||||
|
// };
|
||||||
|
|
||||||
|
const getRightTable = (row: any) => {
|
||||||
|
fetchCodeDetail({ sqh: row.sqh }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
rightTableData.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const goReport = () => {
|
||||||
|
// 跳转到报告查询页面
|
||||||
|
router.push('/regional/inspectionReport/report?startdate=2025-08-19&endate=2025-08-19&deptcode=0210&userid=00910&brdh=')
|
||||||
|
};
|
||||||
|
|
||||||
|
const cancelHandle = () => {
|
||||||
|
if (sqhs.value.length <= 0) return ElMessage.warning('请选择数据!')
|
||||||
|
ElMessageBox.confirm(`确定作废选中的数据吗?`, "提示", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === "confirm") {
|
||||||
|
const requests = sqhs.value.map((item: any) => { return item.sqh });
|
||||||
|
fetchCodeExec({
|
||||||
|
sqh: requests.join(','),
|
||||||
|
userid: 'lis',
|
||||||
|
status: 9,
|
||||||
|
yljg: 1
|
||||||
|
}).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success('调用成功');
|
||||||
|
done();
|
||||||
|
getList()
|
||||||
|
} else {
|
||||||
|
ElMessage.error('调用失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}).catch(() => { });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
// 初始化3天区间(今天-前两天)
|
||||||
|
// const end = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||||
|
// const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD HH:mm:ss'); //add 时间往后
|
||||||
|
// queryParams.times = [start, end];
|
||||||
|
// console.log(queryParams.times);
|
||||||
|
getList()
|
||||||
|
adjustTableHeight();
|
||||||
|
// 加载病人来源字典
|
||||||
|
const dictRefs = await comDict('PT', 'HOS', 'ST');
|
||||||
|
|
||||||
|
// 从 ref 中获取实际数据
|
||||||
|
dictData.value = {
|
||||||
|
PT: toRaw(dictRefs.PT.value) || [],
|
||||||
|
HOS: toRaw(dictRefs.HOS.value) || [],
|
||||||
|
ST: toRaw(dictRefs.ST.value) || [],
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// 字典格式化方法
|
||||||
|
const formatDict = (v: string, dictType: string) => {
|
||||||
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 计算table高度
|
||||||
|
watch(showSearch, () => {
|
||||||
|
nextTick(() => {
|
||||||
|
adjustTableHeight();
|
||||||
|
})
|
||||||
|
}, { immediate: true });
|
||||||
|
|
||||||
|
function adjustTableHeight() {
|
||||||
|
if (compactForm.value) {
|
||||||
|
// 获取高度
|
||||||
|
heightForm.value = compactForm.value.offsetHeight;
|
||||||
|
tableConfig.value.height = `calc(74vh - ${heightForm.value}px)`; // 设置表格容器的高度
|
||||||
|
rightTableConfig.value.height = `calc(74vh - ${heightForm.value}px)`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handletime = (val: Array<string>) => {
|
||||||
|
// console.log('时间', val);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成条码
|
||||||
|
const printHandle = () => {
|
||||||
|
const data = {
|
||||||
|
dept: '0235',
|
||||||
|
userid: 'lis',
|
||||||
|
st: '',
|
||||||
|
et: '',
|
||||||
|
yljg: queryParams.yljg
|
||||||
|
}
|
||||||
|
if (queryParams.times && queryParams.times.length) {
|
||||||
|
data.st = queryParams.times[0]
|
||||||
|
data.et = queryParams.times[1]
|
||||||
|
}
|
||||||
|
addObj(data).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询申请单
|
||||||
|
const getList = () => {
|
||||||
|
loading.value = true;
|
||||||
|
const data = {
|
||||||
|
dept: '0235',
|
||||||
|
userid: 'lis',
|
||||||
|
st: queryParams.times[0],
|
||||||
|
et: queryParams.times[1],
|
||||||
|
yljg: queryParams.yljg
|
||||||
|
}
|
||||||
|
fetchCodeList(data).then((response: any) => {
|
||||||
|
if (response.code == 0) {
|
||||||
|
loading.value = false;
|
||||||
|
tableData.value = response.data
|
||||||
|
if (tableData.value.length > 0) {
|
||||||
|
rowHandle(response.data[0])
|
||||||
|
getRightTable(response.data[0])
|
||||||
|
tableRef.value.setCurrentRow(response.data[0])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectStatusRows = () => {
|
||||||
|
tableRef.value.clearSelection()
|
||||||
|
tableData.value.forEach((item: any) => {
|
||||||
|
if (item.zt == 1) {
|
||||||
|
tableRef.value.toggleRowSelection(item, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打印pdf
|
||||||
|
const printPdf = () => {
|
||||||
|
if (sqhs.value.length <= 0) return ElMessage.warning('请选择数据!')
|
||||||
|
ElMessageBox.confirm(`确定打印选中的数据吗?`, "提示", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === "confirm") {
|
||||||
|
const requests = sqhs.value.map((item: any) => { return item.sqh });
|
||||||
|
fetchCodeExec({
|
||||||
|
sqh: requests.join(','),
|
||||||
|
userid: 'lis',
|
||||||
|
status: 11,
|
||||||
|
yljg: 1
|
||||||
|
}).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
done();
|
||||||
|
getList()
|
||||||
|
HiprintPrinter.silentPrint(res.data);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-row-class {
|
||||||
|
background-color: #c6c3ff !important;
|
||||||
|
/* 设置行背景色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-table {
|
||||||
|
border: 1px solid #E1E9F7;
|
||||||
|
padding-top: .3125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
border-bottom: 1px solid #E1E9F7;
|
||||||
|
margin-bottom: .625rem;
|
||||||
|
padding: .625rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-line-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: .35rem;
|
||||||
|
background-color: #f0f3f8;
|
||||||
|
padding: .3rem 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-line-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
width: 16.6%;
|
||||||
|
// padding: 0 30px;
|
||||||
|
|
||||||
|
.timeline-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.index {
|
||||||
|
width: 1.875rem;
|
||||||
|
height: 1.875rem;
|
||||||
|
line-height: 1.875rem;
|
||||||
|
background: #E1E9F7;
|
||||||
|
border-radius: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 1.125rem;
|
||||||
|
color: #4767A3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
background-color: #4096ff;
|
||||||
|
box-shadow: 0 0 0 .25rem rgba(64, 150, 255, 0.2);
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-title {
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: #4767A3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline-time {
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: .875rem;
|
||||||
|
color: #4767A3;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.timg {
|
||||||
|
width: 3.125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
1011
src/views/regional/inspectionReport/report/index.vue
Normal file
1011
src/views/regional/inspectionReport/report/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -40,9 +40,8 @@ export default defineConfig(({
|
|||||||
proxy: {
|
proxy: {
|
||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
'/dev-api': {
|
'/dev-api': {
|
||||||
// target: 'http://localhost:9801',
|
|
||||||
target: 'http://47.97.125.165:8904',
|
target: 'http://47.97.125.165:8904',
|
||||||
// target: 'http://192.168.1.114:9801',
|
// target: 'http://192.168.1.151:9801',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user