diff --git a/src/api/liswork/batchCheck/batchCheckApi.ts b/src/api/liswork/batchCheck/batchCheckApi.ts index 6807596..91d27b0 100644 --- a/src/api/liswork/batchCheck/batchCheckApi.ts +++ b/src/api/liswork/batchCheck/batchCheckApi.ts @@ -27,3 +27,12 @@ export function cancelBatchCheckService(data: any) { data, }); } + +//获取检验结果明细数据 +export function queryBatchCheckDetailService(query: any) { + return request({ + url: "/batchCheck/queryDetailResult", + method: "get", + params: query, + }); +} diff --git a/src/components/SelectTable/YQSelectTable/index.vue b/src/components/SelectTable/YQSelectTable/index.vue index 192cb12..6ba03ed 100644 --- a/src/components/SelectTable/YQSelectTable/index.vue +++ b/src/components/SelectTable/YQSelectTable/index.vue @@ -27,7 +27,7 @@ const props = withDefaults(defineProps<{ data: '' }) -const instrOptions = ref>([]); +const instrOptions = ref>([]); const fields = ref( [ @@ -48,6 +48,7 @@ const getYqConfig = () => { instrOptions.value = res.data.map((item: any) => ({ yq: item.yq.trim(), yqmc: item.yqmc, + yqdl: item.yqdl, lisgroupid: item.lisgroup })) } diff --git a/src/utils/czUtil/lisUtil.ts b/src/utils/czUtil/lisUtil.ts index 74f2b32..ffb18ad 100644 --- a/src/utils/czUtil/lisUtil.ts +++ b/src/utils/czUtil/lisUtil.ts @@ -15,7 +15,5 @@ export function displayBRNL(nl: string | number, nldw: string) { if (nl === "" || nl === null || nl === undefined) { return ""; } - return ( - nl + (nldw === "1" ? "岁" : nldw === "2" ? "月" : nldw === "3" ? "天" : "") - ); + return nl + (nldw === "1" ? "岁" : nldw === "2" ? "月" : nldw === "3" ? "天" : ""); } diff --git a/src/views/liswork/batchCheck/LabResult.vue b/src/views/liswork/batchCheck/LabResult.vue new file mode 100644 index 0000000..30eb8a5 --- /dev/null +++ b/src/views/liswork/batchCheck/LabResult.vue @@ -0,0 +1,46 @@ + + + + + + diff --git a/src/views/liswork/batchCheck/LabResultMed.vue b/src/views/liswork/batchCheck/LabResultMed.vue new file mode 100644 index 0000000..33ca753 --- /dev/null +++ b/src/views/liswork/batchCheck/LabResultMed.vue @@ -0,0 +1,52 @@ + + + + + + diff --git a/src/views/liswork/batchCheck/index.vue b/src/views/liswork/batchCheck/index.vue index c79b85a..b182df2 100644 --- a/src/views/liswork/batchCheck/index.vue +++ b/src/views/liswork/batchCheck/index.vue @@ -1,36 +1,35 @@ @@ -77,6 +92,11 @@ import { batchCheckService, queryBatchCheckListService, cancelBatchCheckService import dayjs from 'dayjs'; import { formatDict, getDictData } from '@/hooks' import { displayBRNL, displayBRXB } from '@/utils/czUtil/lisUtil' +//@ts-ignore +import useUserStore from '@/store/modules/user'; +import LabResult from './LabResult.vue'; +import LabResultMed from './LabResultMed.vue'; + const formData = ref({ lisgroup: '', //仪器分组 @@ -96,6 +116,9 @@ const tableRef = ref(); const form = ref(); const msg = ref('') //审核后结果显示 const tableData = ref() +const userStore = useUserStore() +const paramObj = ref(null) // 用于传递给 LabResult 组件的参数对象 +const isXJY = ref(false) const columns = ref([ { type: 'selection', title: '选择', visible: true, align: 'center', width: 40 }, { prop: 'jgbz', label: '审核标志', visible: true, align: 'center', slot: 'jgbz' }, @@ -111,13 +134,13 @@ const columns = ref([ { prop: 'ksdh', label: '科室', visible: true, align: 'center', slot: 'ksdh' }, { prop: 'ch', label: '床号', visible: true, align: 'center' }, { prop: 'sjys', label: '送检医生', visible: true, align: 'center', slot: 'sjys' }, - { prop: 'sqsj', label: '申请时间', visible: true, align: 'center', width: 150 }, - { prop: 'cysj', label: '采样时间', visible: true, align: 'center', width: 150 }, + { prop: 'sqsj', label: '送检时间', visible: true, align: 'center', width: 150 }, + { prop: 'cyrq', label: '采样时间', visible: true, align: 'center', width: 150 }, { prop: 'yhdhmc', label: '检验医师', visible: true, align: 'center' }, { prop: 'dysj', label: '报告日期', visible: true, align: 'center', width: 150 }, - { prop: 'yblx', label: '样本', visible: true, align: 'center' }, + { prop: 'yblx', label: '样本类型', visible: true, align: 'center', slot: 'yblx' }, { prop: 'hdysmc', label: '核对医生', visible: true, align: 'center' }, - { prop: 'dybz', label: '打印标志', visible: true, align: 'center' }, + { prop: 'dybz', label: '打印标志', visible: true, align: 'center', slot: 'dybz' }, { prop: 'zd', label: '临床诊断', visible: true, align: 'center' }, { prop: 'bz', label: '备注', visible: true, align: 'center' }, { prop: 'confirmermc', label: '审核人', visible: true, align: 'center' }, @@ -207,9 +230,8 @@ const checkData = async () => { const selected = tableRef.value?.getSelectionRows ? tableRef.value.getSelectionRows() : (tableRef.value?.tableRef?.getSelectionRows ? tableRef.value.tableRef.getSelectionRows() : []) - const paramList = (selected || []).map((item: any) => ({ - userId: "", + userId: userStore.name || '', yq: String(item.yq).trim(), jyrq: dayjs(item.jyrq).format('YYYY-MM-DD HH:mm:ss'), ybh: item.ybh, @@ -219,8 +241,6 @@ const checkData = async () => { msg.value = '请先选择要审核的行' return } - - console.log(paramList) const ret = await batchCheckService(paramList) if (ret && ret.code === 200) { msg.value = '审核成功:' + ret.msg @@ -229,15 +249,43 @@ const checkData = async () => { } const cancelCheck = async () => { - const paramList = tableRef.value.getSelectedRows() + const selected = tableRef.value?.getSelectionRows + ? tableRef.value.getSelectionRows() + : (tableRef.value?.tableRef?.getSelectionRows ? tableRef.value.tableRef.getSelectionRows() : []) + const paramList = (selected || []).map((item: any) => ({ + userId: userStore.name || '', + yq: String(item.yq).trim(), + jyrq: dayjs(item.jyrq).format('YYYY-MM-DD HH:mm:ss'), + ybh: item.ybh, + })) + + if (!paramList.length) { + msg.value = '请先选择要审核的行' + return + } const ret = await cancelBatchCheckService(paramList) if (ret.code === 200) { getList() } } + +const tableRowClick = (row: any) => { + paramObj.value = { + yq: String(row.yq).trim(), + jyrq: dayjs(row.jyrq).format('YYYY-MM-DD'), + ybh: row.ybh, + } +} + + +const getYQList = (val: { yq: string; yqmc: string; yqdl: string } | null) => { + isXJY.value = String(val?.yqdl ?? '').trim() === '细菌仪'; + console.log('选择的仪器大类:', val?.yqdl, '是否是细菌仪:', isXJY.value) +} + onMounted(() => { - getDictData('DP', 'SRD') + getDictData('DP', 'SRD', 'BT', 'PT') })