统计
This commit is contained in:
parent
4909e9b67b
commit
13a79f9801
@ -33,6 +33,14 @@ export function querySampleSignBack(query?: Object) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 标本数量统计
|
||||
export function querySampleTypeCount(query?: Object) {
|
||||
return request({
|
||||
url: '/transitReport/sampleTypeCount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 标本报表
|
||||
export function sampleTypeCount(query?: Object) {
|
||||
return request({
|
||||
|
||||
@ -25,7 +25,7 @@ import dayjs from 'dayjs'
|
||||
const userStore = useUserStore()
|
||||
|
||||
const font = reactive({
|
||||
color: 'rgba(0, 0, 0, .2)',
|
||||
color: 'rgba(0, 0, 0, .15)',
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
</template>
|
||||
<template #itemclass_yblx="{ row }">
|
||||
<SelectTable v-model:data="row.itemclass_yblx" :tableData="dictData.BT" placeholder="请选择"
|
||||
:clearable="false" v-if="row.status == 10" value="label"
|
||||
:clearable="false" v-if="row.status == 10 || !row.status" value="label"
|
||||
@getDataValue="(data) => { getyblxData(data, row) }" class="full-width-input" />
|
||||
<span v-else style="padding-left: 5px;"> {{ formatDict(row.itemclass_yblx, 'BT') }}</span>
|
||||
</template>
|
||||
|
||||
@ -5,40 +5,18 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="委托机构:" prop="srcHospName">
|
||||
<el-input v-model="queryParams.srcHospName" :size="aotuSize" readonly />
|
||||
<el-input v-model="queryParams.srcHospName" :title="queryParams.srcHospName" :size="aotuSize" readonly
|
||||
v-if="!checkDeptRole(['admin'])" />
|
||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList" v-else
|
||||
label="label" :size="aotuSize" value="label" placeholder="请选择委托机构" />
|
||||
</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-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-form-item label="样本:" prop="SampleTypeName">
|
||||
<el-input v-model="queryParams.SampleTypeName" placeholder="请输入组合名称" clearable />
|
||||
</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="开始时间"
|
||||
@ -53,24 +31,10 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="mb10">
|
||||
<el-button type="primary" @click="thHandle(20)">重新采集</el-button>
|
||||
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
|
||||
<el-button type="primary" @click="thHandle(90)">申请作废</el-button>
|
||||
|
||||
</div>
|
||||
<div style="height: calc(100% - 180px)">
|
||||
<div style="height: calc(100% - 100px)">
|
||||
<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>
|
||||
:loading="loading" @size-change="sizeChange" @page-change="currentChange">
|
||||
|
||||
</CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
@ -78,45 +42,41 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { querySampleSignBack, sampleSign } from '@/api/regional/index'
|
||||
import { querySampleTypeCount, sampleSign } from '@/api/regional/index'
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import { classCom } from '@/utils/classCom';
|
||||
import { listhospital } from "@/api/regional/dict/hospital";
|
||||
import { listregdict } from "@/api/regional/dict/regdict";
|
||||
import { ElMessage } from 'element-plus';
|
||||
import dayjs from 'dayjs';
|
||||
import { checkDeptRole } from '@/utils/permission'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const aotuSize = classCom.useAutoSize();
|
||||
const userStore = useUserStore()
|
||||
|
||||
|
||||
const queryParams: any = ref({
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
srcHospName: userStore.sysLoginParam.loginYLJGName,
|
||||
dateType: '登记时间',
|
||||
SampleTypeName: '',
|
||||
})
|
||||
const tableData: any = ref([])
|
||||
const columns: any = ref([
|
||||
{ type: 'selection', align: 'center', visible: true, width: 40 },
|
||||
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
||||
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 60 },
|
||||
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
|
||||
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
|
||||
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
|
||||
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
|
||||
{ prop: 'srcHospName', label: '检测机构', align: 'center', visible: true, width: 200 },
|
||||
{ prop: 'Status', label: '标本状态', align: 'center', visible: true, slot: "status" },
|
||||
{ prop: 'backReasons', label: '退回理由', align: 'center', visible: true, width: 150 },
|
||||
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
|
||||
{ prop: 'backUserName', label: '操作人', align: 'center', visible: true, },
|
||||
{ prop: 'backTime', label: '操作时间', align: 'center', visible: true, width: 150 },
|
||||
|
||||
const loading = ref(false)
|
||||
const tableData = ref([])
|
||||
const columns = ref([
|
||||
{ prop: 'srchospname', label: '委托机构', align: 'center', visible: true, },
|
||||
{ prop: 'sampletypename', label: '样本', align: 'center', visible: true, },
|
||||
{ prop: 'sampletypecode', label: '编码', align: 'center', visible: true, },
|
||||
{ prop: 'sl', label: '数量', align: 'center', visible: true, },
|
||||
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '100%', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// fit: true, // 列宽自适应
|
||||
summary: true,
|
||||
summaryField: ['sl',],//计算列总和
|
||||
sumText: '合计'
|
||||
})
|
||||
|
||||
const pagination = ref({
|
||||
@ -127,21 +87,13 @@ const pagination = ref({
|
||||
})
|
||||
|
||||
const ksdhFields = ref([
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', width: 200, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 80, 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)
|
||||
}
|
||||
@ -171,16 +123,17 @@ const resetHandle = () => {
|
||||
queryParams.value = {
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
dateType: '登记时间',
|
||||
srcHospName: userStore.sysLoginParam.loginYLJGName,
|
||||
}
|
||||
getDays()
|
||||
handleQuery()
|
||||
}
|
||||
const getList = () => {
|
||||
querySampleSignBack(queryParams.value).then((res: any) => {
|
||||
loading.value = true
|
||||
querySampleTypeCount(queryParams.value).then((res: any) => {
|
||||
tableData.value = res.rows
|
||||
pagination.value.total = res.total
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
@ -188,6 +141,12 @@ const getDays = () => {
|
||||
const end = dayjs().format('YYYY-MM-DD');
|
||||
const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD'); //add 时间往后
|
||||
queryParams.value.times = [start, end];
|
||||
|
||||
if (userStore.sysLoginParam.loginYLJG == 1) {
|
||||
queryParams.value.srcHospName = ''
|
||||
} else {
|
||||
queryParams.value.srcHospName = userStore.sysLoginParam.loginYLJGName
|
||||
}
|
||||
}
|
||||
|
||||
const hosList = ref([])
|
||||
@ -216,7 +175,7 @@ const formatDict = (v: string, arr: Array<any>) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compact-form {
|
||||
height: 5rem;
|
||||
height: 2.5rem;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
|
||||
@ -5,13 +5,15 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="就诊医院:" prop="srcHospName">
|
||||
<el-input v-model="queryParams.srcHospName" :size="aotuSize" readonly />
|
||||
<el-input v-model="queryParams.srcHospName" :title="queryParams.srcHospName" :size="aotuSize" readonly
|
||||
v-if="!checkDeptRole(['admin'])" />
|
||||
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList" v-else
|
||||
label="label" :size="aotuSize" value="label" placeholder="请选择委托机构" />
|
||||
</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 label="组合名称:" prop="SrcOrderItemName">
|
||||
<el-input v-model="queryParams.SrcOrderItemName" placeholder="请输入组合名称" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -29,10 +31,9 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="mb10"></div>
|
||||
<div style="height: calc(100% - 100px);">
|
||||
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
|
||||
@size-change="sizeChange" @page-change="currentChange">
|
||||
:loading="loading" @size-change="sizeChange" @page-change="currentChange">
|
||||
|
||||
</CustomTable>
|
||||
</div>
|
||||
@ -49,14 +50,17 @@ import { listregdict } from "@/api/regional/dict/regdict";
|
||||
import { ElMessage } from 'element-plus';
|
||||
const aotuSize = classCom.useAutoSize();
|
||||
import dayjs from 'dayjs';
|
||||
import { checkDeptRole } from '@/utils/permission'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const userStore = useUserStore()
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
times: [],
|
||||
srcHospName: userStore.sysLoginParam.loginYLJGName,
|
||||
srcHospName: '',
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const tableData = ref([])
|
||||
const columns = ref([
|
||||
{ prop: 'SrcHospName', label: '就诊医院', align: 'center', visible: true, },
|
||||
@ -83,8 +87,8 @@ const pagination = ref({
|
||||
})
|
||||
|
||||
const ksdhFields = ref([
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', width: 200, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
||||
@ -113,15 +117,17 @@ const resetHandle = () => {
|
||||
queryParams.value = {
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
srcHospName: userStore.sysLoginParam.loginYLJGName,
|
||||
}
|
||||
getDays()
|
||||
handleQuery()
|
||||
}
|
||||
const getList = () => {
|
||||
loading.value = true
|
||||
sampleitemCount(queryParams.value).then((res: any) => {
|
||||
tableData.value = res.rows
|
||||
pagination.value.total = res.total
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
@ -129,6 +135,12 @@ const getDays = () => {
|
||||
const end = dayjs().format('YYYY-MM-DD');
|
||||
const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD'); //add 时间往后
|
||||
queryParams.value.times = [start, end];
|
||||
|
||||
if (userStore.sysLoginParam.loginYLJG == 1) {
|
||||
queryParams.value.srcHospName = ''
|
||||
} else {
|
||||
queryParams.value.srcHospName = userStore.sysLoginParam.loginYLJGName
|
||||
}
|
||||
}
|
||||
|
||||
const hosList = ref([])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user