条码自动签收
This commit is contained in:
parent
8d6f27e377
commit
459342d3e3
@ -115,4 +115,12 @@ export function printsetup(query?: Object) {
|
|||||||
params: query,
|
params: query,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 取消采样
|
||||||
|
export function cancelExecSQD(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/zyreq/cancelExecSQD',
|
||||||
|
method: 'post',
|
||||||
|
data: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -455,6 +455,14 @@ export function querybarcode(query?: Object) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 手动保存签收条码
|
||||||
|
export function saveBarcode(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/liswork/savebarcode',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
// 拒收条码
|
// 拒收条码
|
||||||
export function refusedbarcode(query?: Object) {
|
export function refusedbarcode(query?: Object) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -368,6 +368,10 @@ const toggleRowSelection = (row: Object, selected: boolean) => {
|
|||||||
tableRef.value?.toggleRowSelection(row, selected);
|
tableRef.value?.toggleRowSelection(row, selected);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getSelectionRows = () => {
|
||||||
|
return tableRef.value?.getSelectionRows() || [];
|
||||||
|
};
|
||||||
|
|
||||||
const toggleAllSelection = () => {
|
const toggleAllSelection = () => {
|
||||||
tableRef.value?.toggleAllSelection();
|
tableRef.value?.toggleAllSelection();
|
||||||
};
|
};
|
||||||
@ -400,6 +404,7 @@ const sort = (prop: string, order: any) => {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
clearSelection,
|
clearSelection,
|
||||||
toggleRowSelection,
|
toggleRowSelection,
|
||||||
|
getSelectionRows,
|
||||||
toggleAllSelection,
|
toggleAllSelection,
|
||||||
setCurrentRow,
|
setCurrentRow,
|
||||||
setScrollTo,
|
setScrollTo,
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
<el-button type="info" :size="aotuSize" plain icon="Upload" @click="openBlock('采样登记')">采样登记</el-button>
|
<el-button type="info" :size="aotuSize" plain icon="Upload" @click="openBlock('采样登记')">采样登记</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="info" :size="aotuSize" plain @click="closeHadnle">取消登记</el-button>
|
<el-button type="info" :size="aotuSize" plain @click="closeHadnle">取消采样</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="warning" :size="aotuSize" plain @click="openBlock('送检登记')">送检登记</el-button>
|
<el-button type="warning" :size="aotuSize" plain @click="openBlock('送检登记')">送检登记</el-button>
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" :size="aotuSize" plain @click="sendSampleHandle">清单打印</el-button>
|
<el-button type="warning" :size="aotuSize" plain @click="sendSampleHandle">清单打印</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" :size="aotuSize" plain @click="changePrinter">打印机设置</el-button>
|
<el-button type="warning" :size="aotuSize" plain @click="changePrinter">打印机设置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -137,6 +137,7 @@
|
|||||||
<!-- 采样登记 -->
|
<!-- 采样登记 -->
|
||||||
<el-dialog v-model="dialogVisible" :title="title" draggable :close-on-click-modal="false" width="70vw"
|
<el-dialog v-model="dialogVisible" :title="title" draggable :close-on-click-modal="false" width="70vw"
|
||||||
@close="closeDialog">
|
@close="closeDialog">
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-input ref="sqhRef" v-model="sqhText" clearable placeholder="条形码" @keyup.enter="sqdQuery"
|
<el-input ref="sqhRef" v-model="sqhText" clearable placeholder="条形码" @keyup.enter="sqdQuery"
|
||||||
@ -147,11 +148,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
<CustomTable :data="cyTableData" :columns="cyColumns" :config="cyTableConfig">
|
<CustomTable :data="cyTableData" :columns="cyColumns" :config="cyTableConfig">
|
||||||
<template #zt="{ row }">
|
<template #zt="{ row }">
|
||||||
{{ formatDict(row.zt, 'ST') }}
|
{{ formatDict(row.zt, 'ST') }}
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
|
<div class="text_ts">合计:{{ cyTableData.length }} 条</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog v-model="previewShow" title="预览" width="90vw" :close-on-click-modal="false">
|
<el-dialog v-model="previewShow" title="预览" width="90vw" :close-on-click-modal="false">
|
||||||
<iFrame v-if="pdfUrl" :src="pdfUrl" />
|
<iFrame v-if="pdfUrl" :src="pdfUrl" />
|
||||||
@ -170,7 +174,7 @@ import { usePrintStore } from '@/store/modules/printStore'
|
|||||||
import { checkPrintService, downloadPrintSetup } from '@/utils/printHelper'
|
import { checkPrintService, downloadPrintSetup } from '@/utils/printHelper'
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { getUserName } from '@/api/system/user.js'
|
import { getUserName } from '@/api/system/user.js'
|
||||||
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain, printSendSample, printcheck, printsetup } from '@/api/checkCode/index'
|
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain, printSendSample, printcheck, printsetup, cancelExecSQD } from '@/api/checkCode/index'
|
||||||
const aotuSize = classCom.useAutoSize();
|
const aotuSize = classCom.useAutoSize();
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
@ -187,6 +191,7 @@ const printStore = usePrintStore();
|
|||||||
const printerList = computed(() => printStore.printerList);
|
const printerList = computed(() => printStore.printerList);
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
import { getDicts } from '@/api/system/dict/data'
|
import { getDicts } from '@/api/system/dict/data'
|
||||||
|
import { sum } from 'lodash';
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { lis_reqcx_type } = proxy.useDict("lis_reqcx_type"); //参数类别
|
const { lis_reqcx_type } = proxy.useDict("lis_reqcx_type"); //参数类别
|
||||||
@ -501,6 +506,31 @@ const openBlock = (value: string) => {
|
|||||||
const closeHadnle = () => {
|
const closeHadnle = () => {
|
||||||
const selections = tableRef.value.allSelection()
|
const selections = tableRef.value.allSelection()
|
||||||
if (selections.length <= 0) return ElMessage.warning('请选择数据!')
|
if (selections.length <= 0) return ElMessage.warning('请选择数据!')
|
||||||
|
ElMessageBox.confirm(`确定取消选中的数据吗?`, "提示", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === "confirm") {
|
||||||
|
const requests = selections.map((item: any) => {
|
||||||
|
return {
|
||||||
|
sqh: item.sqh,
|
||||||
|
status: 12,
|
||||||
|
userid: queryParams.userid,
|
||||||
|
yljg: queryParams.yljg
|
||||||
|
}
|
||||||
|
});
|
||||||
|
cancelExecSQD(requests).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.msg);
|
||||||
|
done();
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}).catch(() => { });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -806,6 +836,13 @@ const printPdf = () => {
|
|||||||
height: 75vh;
|
height: 75vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text_ts {
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<el-button type="primary" @click="sqdQuery" plain>读取</el-button>
|
<el-button type="primary" @click="sqdQuery" plain>读取</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain>保存</el-button>
|
<el-button type="primary" plain :disabled="RCV_AUTOSAVE == '1'" @click="saveHandle">保存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" @click="setHandle" plain>设置</el-button>
|
<el-button type="primary" @click="setHandle" plain>设置</el-button>
|
||||||
@ -25,8 +25,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<div class="table-main">
|
<div class="table-main">
|
||||||
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" @selection-change="handleSelectionChange"
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig"
|
||||||
:enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
|
@selection-change="handleSelectionChange" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
|
||||||
<template #jzbz="{ row }">
|
<template #jzbz="{ row }">
|
||||||
<div style="color: #f00;" v-if="row.jzbz == '1'">急</div>
|
<div style="color: #f00;" v-if="row.jzbz == '1'">急</div>
|
||||||
<div style="color: transparent;" v-else>无</div>
|
<div style="color: transparent;" v-else>无</div>
|
||||||
@ -41,7 +41,10 @@
|
|||||||
{{ formatDict(row.brxb, 'SX') }}
|
{{ formatDict(row.brxb, 'SX') }}
|
||||||
</template>
|
</template>
|
||||||
<template #sqys="{ row }">
|
<template #sqys="{ row }">
|
||||||
{{ formatYs(row.sqys) }}
|
{{ formatDict(row.sqys, 'SRD') }}
|
||||||
|
</template>
|
||||||
|
<template #cyr="{ row }">
|
||||||
|
{{ formatDict(row.cyr, 'SRD') }}
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
</div>
|
</div>
|
||||||
@ -68,51 +71,71 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<CheckUser ref="checkUser" @onConfirm="handleCheckUserConfirm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { querybarcode, autosavebarcode } from '@/api/liswork/work/LisWork';
|
import { querybarcode, autosavebarcode, saveBarcode } from '@/api/liswork/work/LisWork';
|
||||||
import { paramList, updateParam } from '@/api/liswork/xtwh/ComOpt'
|
import { paramList, updateParam } from '@/api/liswork/xtwh/ComOpt'
|
||||||
import { formatDict, getDictData } from '@/hooks'
|
import { formatDict, getDictData } from '@/hooks'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { listUser } from '@/api/system/user.js'
|
import { listUser } from '@/api/system/user.js'
|
||||||
|
import CheckUser from "@/views/liswork/work/components/CheckUser.vue";
|
||||||
|
import { checkuser } from "@/api/liswork/work/LisWork";
|
||||||
|
import { classCom } from '@/utils/classCom';
|
||||||
const sqhRef = useTemplateRef('sqhRef');
|
const sqhRef = useTemplateRef('sqhRef');
|
||||||
const sqhText = ref('');
|
const checkUser = useTemplateRef('checkUser');
|
||||||
|
const tableRef = useTemplateRef('tableRef');
|
||||||
|
const sqhText = ref('25082007185');
|
||||||
|
const RCV_AUTOSAVE = ref('0') // 是否自动保存
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ type: 'selection', width: 30, visible: true, align: 'center' },
|
{ type: 'selection', width: 30, visible: true, align: 'center' },
|
||||||
{ label: '急诊', prop: 'jzbz', width: 50, visible: true, slot: 'jzbz' },
|
{ label: '急诊', prop: 'jzbz', width: 50, visible: true, slot: 'jzbz', align: 'center' },
|
||||||
{ label: '类别', prop: 'bgddh', visible: true, },
|
{ label: '类别', prop: 'bgdjc', visible: true, align: 'center' },
|
||||||
{ label: '标本', prop: 'yblx', visible: true, width: 60, align: 'center' },
|
{ label: '标本', prop: 'yblx', visible: true, width: 60, align: 'center' },
|
||||||
{ label: '申请科室', prop: 'ksdh', visible: true, slot: 'ksdh' },
|
{ label: '申请科室', prop: 'ksdh', visible: true, slot: 'ksdh' },
|
||||||
{ label: '床号', prop: 'ch', visible: true, width: 50, align: 'center' },
|
{ label: '床号', prop: 'ch', visible: true, width: 50, align: 'center' },
|
||||||
{ label: '病历号', prop: 'brdh', visible: true, },
|
{ label: '病历号', prop: 'brdh', visible: true, align: 'center' },
|
||||||
{ label: '病历号', prop: 'brdh', visible: true, },
|
|
||||||
{ label: '姓名', prop: 'brxm', visible: true, width: 40, align: 'center' },
|
{ label: '姓名', prop: 'brxm', visible: true, width: 40, align: 'center' },
|
||||||
{ label: '性别', prop: 'brxb', visible: true, slot: 'brxb', width: 40, align: 'center' },
|
{ label: '性别', prop: 'brxb', visible: true, slot: 'brxb', width: 40, align: 'center' },
|
||||||
{ label: '申请号/条码', prop: 'sqh', visible: true, width: 100, align: 'center' },
|
{ label: '申请号/条码', prop: 'sqh', visible: true, width: 100, align: 'center' },
|
||||||
{ label: '申请项目', prop: 'jymd', visible: true, width: 200, align: 'center' },
|
{ label: '申请项目', prop: 'jymd', visible: true, width: 200, align: 'center' },
|
||||||
{ label: '签收状态', prop: 'zt', visible: true, slot: 'zt' },
|
{ label: '签收状态', prop: 'zt', visible: true, slot: 'zt', align: 'center' },
|
||||||
{ label: '拒签理由', prop: 'bz3', visible: true, },
|
{ label: '拒签理由', prop: 'bz3', visible: true, align: 'center' },
|
||||||
{ label: '申请医生', prop: 'sqys', visible: true, slot: 'sqys' },
|
{ label: '申请医生', prop: 'sqys', visible: true, slot: 'sqys', align: 'center' },
|
||||||
{ label: '采样人', prop: 'cyr', visible: true, },
|
{ label: '采样人', prop: 'cyr', visible: true, slot: 'cyr', align: 'center' },
|
||||||
{ label: '标本送出人', prop: 'bbsjrname', visible: true, },
|
{ label: '标本送出人', prop: 'bbsjr', visible: true, align: 'center' },
|
||||||
{ label: '申请时间', prop: 'sqsj', visible: true, },
|
{ label: '申请时间', prop: 'sqsj', visible: true, align: 'center', width: 140, },
|
||||||
{ label: '采样时间', prop: 'cyblsj', visible: true, },
|
{ label: '采样时间', prop: 'cysj', visible: true, align: 'center', width: 140, },
|
||||||
{ label: '标本送出时间', prop: 'sjsj', visible: true, width: 100, },
|
{ label: '标本送出时间', prop: 'bbsjsj', visible: true, width: 140, align: 'center' },
|
||||||
{ label: '诊断', prop: 'zd', visible: true, },
|
{ label: '诊断', prop: 'zd', visible: true, align: 'center', width: 200, },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
// 单元格样式
|
||||||
|
const cellStyleHd = ({ row, column, rowIndex, columnIndex }) => {
|
||||||
|
if (column.label == "类别") {
|
||||||
|
const bgColor = classCom.decimalToHexColor(row.bkcolor);
|
||||||
|
const textColor = classCom.getContrastTextColor(bgColor);
|
||||||
|
return {
|
||||||
|
backgroundColor: `${bgColor} !important`,
|
||||||
|
color: textColor,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
const tableConfig = {
|
const tableConfig = {
|
||||||
border: true,
|
border: true,
|
||||||
highlightCurrentRow: true,
|
highlightCurrentRow: true,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
key: 'sqh',
|
||||||
|
cellStyle: cellStyleHd,
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleColumnDragEnd = (data) => {
|
const handleColumnDragEnd = (data) => {
|
||||||
console.log('data==>', data);
|
|
||||||
columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,8 +144,15 @@ const sqdQuery = () => {
|
|||||||
if (index !== -1) return ElMessage.warning('该申请单数据已存在!')
|
if (index !== -1) return ElMessage.warning('该申请单数据已存在!')
|
||||||
|
|
||||||
querybarcode({ sqh: sqhText.value }).then((res) => {
|
querybarcode({ sqh: sqhText.value }).then((res) => {
|
||||||
if (res.code == 0 && res.data) {
|
if (res.code == 0 && res.data.sqh) {
|
||||||
tableData.value = tableData.value.concat(res.data)
|
tableData.value.push(res.data)
|
||||||
|
console.log('RCV_AUTOSAVE==>', RCV_AUTOSAVE.value);
|
||||||
|
if (RCV_AUTOSAVE.value == '1') {
|
||||||
|
autosavebarcode({ sqh: res.data.sqh })
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
tableRef.value.toggleRowSelection(res.data, true);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
sqhText.value = ''
|
sqhText.value = ''
|
||||||
@ -136,6 +166,27 @@ const handleSelectionChange = (selection) => {
|
|||||||
console.log("🚀 ~ handleSelectionChange ~ selection:", selection)
|
console.log("🚀 ~ handleSelectionChange ~ selection:", selection)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const saveHandle = () => {
|
||||||
|
const arr = tableRef.value.getSelectionRows()
|
||||||
|
if (!arr.length) return ElMessage.warning('请选择要保存的申请单!')
|
||||||
|
checkUser.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleCheckUserConfirm = (info) => {
|
||||||
|
checkuser({ yhdh: info.yhdh, mm: info.mm }).then(response => {
|
||||||
|
if (response.code == 0) {
|
||||||
|
const arr = tableRef.value.getSelectionRows()
|
||||||
|
const sqhlist = arr.map(item => item.sqh)
|
||||||
|
saveBarcode({ sqhlist, yhdh: info.yhdh }).then((res) => {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableRef.value.clearSelection()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const setList = ref([])
|
const setList = ref([])
|
||||||
const setHandle = () => {
|
const setHandle = () => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
@ -151,32 +202,28 @@ const subHandle = () => {
|
|||||||
updateParam(arr).then((res) => {
|
updateParam(arr).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success('设置保存成功!')
|
ElMessage.success('设置保存成功!')
|
||||||
|
getSetList()
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const formatYs = (v) => {
|
const getSetList = () => {
|
||||||
return userList.value.find(item => item.userId == v)?.nickName || v
|
|
||||||
}
|
|
||||||
|
|
||||||
const userList = ref([])
|
|
||||||
onMounted(() => {
|
|
||||||
getDictData('ST', 'SX', 'DP')
|
|
||||||
|
|
||||||
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
|
|
||||||
listUser(data).then((res) => {
|
|
||||||
userList.value = res.rows;
|
|
||||||
});
|
|
||||||
|
|
||||||
paramList({ yq: '_BAR_', optiontype: 'bar' }).then((res) => {
|
paramList({ yq: '_BAR_', optiontype: 'bar' }).then((res) => {
|
||||||
res.data.forEach(e => {
|
res.data.forEach(e => {
|
||||||
if (e.configOptiontype == 1) {
|
if (e.configOptiontype == 1) {
|
||||||
e.remark = JSON.parse(e.remark)
|
e.remark = JSON.parse(e.remark)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
RCV_AUTOSAVE.value = res.data.find(item => item.configName == '签收自动保存')?.configDefvalue || '0'
|
||||||
setList.value = res.data
|
setList.value = res.data
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getDictData('ST', 'SX', 'DP', 'SRD')
|
||||||
|
|
||||||
|
getSetList()
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<div class="table-main">
|
<div class="table-main">
|
||||||
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" @selection-change="handleSelectionChange"
|
<CustomTable :data="tableData" ref="tableRef" :columns="columns" :config="tableConfig"
|
||||||
:enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
|
@selection-change="handleSelectionChange" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
|
||||||
<template #mode="{ row }">
|
<template #mode="{ row }">
|
||||||
<SelectTable v-model:data="row.mode" :tableData="regModeList" class="full-width-input" />
|
<SelectTable v-model:data="row.mode" :tableData="regModeList" class="full-width-input" />
|
||||||
</template>
|
</template>
|
||||||
@ -47,13 +47,20 @@
|
|||||||
{{ formatDict(row.brxb, 'SX') }}
|
{{ formatDict(row.brxb, 'SX') }}
|
||||||
</template>
|
</template>
|
||||||
<template #sqys="{ row }">
|
<template #sqys="{ row }">
|
||||||
{{ formatYs(row.sqys) }}
|
{{ formatDict(row.sqys, 'SRD') }}
|
||||||
|
</template>
|
||||||
|
<template #cyr="{ row }">
|
||||||
|
{{ formatDict(row.cyr, 'SRD') }}
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 校验用户 -->
|
<!-- 校验用户 -->
|
||||||
<CheckUser ref="checkUserRef" @onConfirm="handleCheckUserConfirm" />
|
<CheckUser ref="checkUserRef" @onConfirm="handleCheckUserConfirm" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 指定护士弹窗 -->
|
||||||
|
<SelectUser ref="selectUserRef" @onConfirm="handleSelectUserConfirm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -63,43 +70,63 @@ import { formatDict, getDictData } from '@/hooks'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { listUser } from '@/api/system/user.js'
|
import { listUser } from '@/api/system/user.js'
|
||||||
import CheckUser from "@/views/liswork/work/components/CheckUser.vue";
|
import CheckUser from "@/views/liswork/work/components/CheckUser.vue";
|
||||||
|
import SelectUser from "./selectUser.vue";
|
||||||
|
import { checkuser } from "@/api/liswork/work/LisWork";
|
||||||
|
import { classCom } from '@/utils/classCom';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { reg_mode } = proxy.useDict("reg_mode"); //参数类别
|
const { reg_mode } = proxy.useDict("reg_mode"); //参数类别
|
||||||
|
|
||||||
const regModeList = reg_mode
|
const regModeList = reg_mode
|
||||||
const sqhRef = useTemplateRef('sqhRef');
|
const sqhRef = useTemplateRef('sqhRef');
|
||||||
const checkUserRef = useTemplateRef('checkUserRef');
|
const checkUserRef = useTemplateRef('checkUserRef');
|
||||||
|
const tableRef = useTemplateRef('tableRef');
|
||||||
|
const selectUserRef = useTemplateRef('selectUserRef');
|
||||||
const sqhText = ref('');
|
const sqhText = ref('');
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ type: 'selection', width: 30, visible: true, align: 'center' },
|
{ type: 'selection', width: 30, visible: true, align: 'center' },
|
||||||
{ label: '登记模式', prop: 'mode', width: 120, visible: true, slot: 'mode' },
|
{ label: '登记模式', prop: 'mode', width: 120, visible: true, slot: 'mode', align: 'center' },
|
||||||
{ label: '不合格类别', prop: 'refuseText', width: 120, visible: true, slot: 'refuseText' },
|
{ label: '不合格类别', prop: 'refuseText', width: 120, visible: true, slot: 'refuseText', align: 'center' },
|
||||||
{ label: '补充描述', prop: 'description', width: 120, visible: true, slot: 'description' },
|
{ label: '补充描述', prop: 'description', width: 120, visible: true, slot: 'description', align: 'center' },
|
||||||
{ label: '急诊', prop: 'jzbz', width: 50, visible: true, slot: 'jzbz' },
|
{ label: '急诊', prop: 'jzbz', width: 50, align: 'center', visible: true, slot: 'jzbz' },
|
||||||
{ label: '类别', prop: 'bgdjc', visible: true, },
|
{ label: '类别', prop: 'bgdjc', visible: true, align: 'center' },
|
||||||
{ label: '标本', prop: 'yblx', visible: true, width: 60, align: 'center' },
|
{ label: '标本', prop: 'yblx', visible: true, width: 60, align: 'center' },
|
||||||
{ label: '申请科室', prop: 'ksdh', visible: true, slot: 'ksdh' },
|
{ label: '申请科室', prop: 'ksdh', visible: true, slot: 'ksdh' },
|
||||||
{ label: '床号', prop: 'ch', visible: true, width: 50, align: 'center' },
|
{ label: '床号', prop: 'ch', visible: true, width: 50, align: 'center' },
|
||||||
{ label: '病历号', prop: 'brdh', visible: true, },
|
{ label: '病历号', prop: 'brdh', visible: true, align: 'center' },
|
||||||
{ label: '病历号', prop: 'brdh', visible: true, },
|
|
||||||
{ label: '姓名', prop: 'brxm', visible: true, width: 40, align: 'center' },
|
{ label: '姓名', prop: 'brxm', visible: true, width: 40, align: 'center' },
|
||||||
{ label: '性别', prop: 'brxb', visible: true, slot: 'brxb', width: 40, align: 'center' },
|
{ label: '性别', prop: 'brxb', visible: true, slot: 'brxb', width: 40, align: 'center' },
|
||||||
{ label: '申请号/条码', prop: 'sqh', visible: true, width: 100, align: 'center' },
|
{ label: '申请号/条码', prop: 'sqh', visible: true, width: 100, align: 'center' },
|
||||||
{ label: '申请项目', prop: 'cp_item', visible: true, width: 200, align: 'center' },
|
{ label: '申请项目', prop: 'item', visible: true, width: 200, align: 'center' },
|
||||||
{ label: '签收状态', prop: 'zt', visible: true, slot: 'zt' },
|
{ label: '签收状态', prop: 'zt', visible: true, slot: 'zt', align: 'center' },
|
||||||
{ label: '申请医生', prop: 'sqys', visible: true, slot: 'sqys' },
|
{ label: '申请医生', prop: 'sqys', visible: true, slot: 'sqys', align: 'center' },
|
||||||
{ label: '采样人', prop: 'cyr', visible: true, },
|
{ label: '采样人', prop: 'cyr', visible: true, slot: 'cyr', align: 'center' },
|
||||||
{ label: '标本送出人', prop: 'bbsjrname', visible: true, },
|
{ label: '标本送出人', prop: 'bbsjr', visible: true, align: 'center' },
|
||||||
{ label: '申请时间', prop: 'sqsj', visible: true, },
|
{ label: '申请时间', prop: 'sqsj', visible: true, align: 'center', width: 140, },
|
||||||
{ label: '采样时间', prop: 'cyblsj', visible: true, },
|
{ label: '采样时间', prop: 'cysj', visible: true, align: 'center', width: 140, },
|
||||||
{ label: '标本送出时间', prop: 'sjsj', visible: true, width: 100, },
|
{ label: '标本送出时间', prop: 'bbsjsj', visible: true, width: 140, align: 'center' },
|
||||||
{ label: '诊断', prop: 'zd', visible: true, },
|
{ label: '诊断', prop: 'zd', visible: true, align: 'center', width: 200, },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
// 单元格样式
|
||||||
|
const cellStyleHd = ({ row, column, rowIndex, columnIndex }) => {
|
||||||
|
if (column.label == "类别") {
|
||||||
|
const bgColor = classCom.decimalToHexColor(row.bkcolor);
|
||||||
|
const textColor = classCom.getContrastTextColor(bgColor);
|
||||||
|
return {
|
||||||
|
backgroundColor: `${bgColor} !important`,
|
||||||
|
color: textColor,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
const tableConfig = {
|
const tableConfig = {
|
||||||
border: true,
|
border: true,
|
||||||
highlightCurrentRow: true,
|
highlightCurrentRow: true,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
key: 'sqh',
|
||||||
|
cellStyle: cellStyleHd,
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleColumnDragEnd = (data) => {
|
const handleColumnDragEnd = (data) => {
|
||||||
@ -111,8 +138,11 @@ const sqdQuery = () => {
|
|||||||
if (index !== -1) return ElMessage.warning('该申请单数据已存在!')
|
if (index !== -1) return ElMessage.warning('该申请单数据已存在!')
|
||||||
|
|
||||||
refusedbarcode({ sqh: sqhText.value }).then((res) => {
|
refusedbarcode({ sqh: sqhText.value }).then((res) => {
|
||||||
if (res.code == 0 && res.data) {
|
if (res.code == 0 && res.data && res.data.length) {
|
||||||
tableData.value = tableData.value.concat(res.data)
|
tableData.value.push(res.data[0])
|
||||||
|
nextTick(() => {
|
||||||
|
tableRef.value.toggleRowSelection(res.data[0], true);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
sqhText.value = ''
|
sqhText.value = ''
|
||||||
@ -127,33 +157,41 @@ const handleSelectionChange = (selection) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const saveData = () => {
|
const saveData = () => {
|
||||||
const flag = tableData.value.every(item => item.mode && item.refuseText && item.description)
|
const arr = tableRef.value.getSelectionRows()
|
||||||
|
if (!arr.length) return ElMessage.warning('请选择要保存的申请单!')
|
||||||
|
|
||||||
|
const flag = arr.every(item => item.mode && item.refuseText && item.description)
|
||||||
if (!flag) return ElMessage.warning('请填写完整拒收信息!')
|
if (!flag) return ElMessage.warning('请填写完整拒收信息!')
|
||||||
checkUserRef.value.open()
|
checkUserRef.value.open()
|
||||||
}
|
}
|
||||||
|
// 校验用户
|
||||||
const handleCheckUserConfirm = (info) => {
|
const handleCheckUserConfirm = (info) => {
|
||||||
tableData.value = tableData.value.map(item => ({
|
checkuser({ yhdh: info.yhdh, mm: info.mm }).then(response => {
|
||||||
...item,
|
if (response.code == 0) {
|
||||||
tzr: info.yhdh,
|
selectUserRef.value.open()
|
||||||
}))
|
}
|
||||||
refusedSaveData(tableData.value).then((res) => {
|
|
||||||
ElMessage.success(res.msg)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const formatYs = (v) => {
|
// 指定护士
|
||||||
return userList.value.find(item => item.userId == v)?.nickName || v
|
const handleSelectUserConfirm = (info) => {
|
||||||
|
const arr = tableRef.value.getSelectionRows()
|
||||||
|
if (!arr.length) return ElMessage.warning('请选择要保存的申请单!')
|
||||||
|
arr = arr.map(item => ({
|
||||||
|
...item,
|
||||||
|
tzr: info.yhdh,
|
||||||
|
}))
|
||||||
|
refusedSaveData(arr).then((res) => {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableRef.value.clearSelection()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const userList = ref([])
|
|
||||||
onMounted(() => {
|
|
||||||
getDictData('ST', 'SX', 'DP')
|
|
||||||
|
|
||||||
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
|
onMounted(() => {
|
||||||
listUser(data).then((res) => {
|
getDictData('ST', 'SX', 'DP', 'SRD')
|
||||||
userList.value = res.rows;
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
120
src/views/liswork/visaRefusal/selectUser.vue
Normal file
120
src/views/liswork/visaRefusal/selectUser.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog v-model="checkShow" :title="title" width="500" :close-on-click-modal="false" :draggable="true"
|
||||||
|
@close="close">
|
||||||
|
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto">
|
||||||
|
<el-form-item label="接听人工号:" prop="yhdh">
|
||||||
|
<el-input ref="yhdhRef" v-model.trim="ruleForm.yhdh" placeholder="请输入用户工号" maxlength="20"
|
||||||
|
@keyup.enter="handleCheckName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名:" prop="name">
|
||||||
|
<el-input v-model.trim="ruleForm.name" placeholder="请输入密码" @keyup.enter="handleCheckyhdh" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<div style="text-align: center; width: 100%;">
|
||||||
|
<el-button type="primary" @click="handleConfirm()"> 确认 </el-button>
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { formatDict, getDictData, dictData } from '@/hooks'
|
||||||
|
// 组件属性
|
||||||
|
const props = defineProps({
|
||||||
|
// 弹窗标题(由外部参数控制)
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '请填写需要重新采集标本通知的护士工号'
|
||||||
|
},
|
||||||
|
// 验证规则(可选,由外部传入)
|
||||||
|
validationRules: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({
|
||||||
|
// 工号最小长度
|
||||||
|
userIdMinLength: 3,
|
||||||
|
// 密码最小长度
|
||||||
|
passwordMinLength: 6
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 组件事件
|
||||||
|
const emit = defineEmits([
|
||||||
|
'onConfirm', // 验证成功回调
|
||||||
|
'onCancel'
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 表单数据
|
||||||
|
const ruleForm = ref({
|
||||||
|
yhdh: '',
|
||||||
|
name: '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = ref(
|
||||||
|
{
|
||||||
|
yhdh: [{ required: true, message: "请输入用户工号", trigger: "blur" },],
|
||||||
|
name: [{ required: true, message: "请输入用户名称", trigger: "blur" },]
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const yhdhRef = ref();
|
||||||
|
const open = () => {
|
||||||
|
checkShow.value = true;
|
||||||
|
flag.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
yhdhRef.value.focus();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const checkShow = ref(false);
|
||||||
|
const ruleFormRef = ref();
|
||||||
|
const flag = ref(true);
|
||||||
|
|
||||||
|
const handleCheckName = () => {
|
||||||
|
ruleForm.value.name = dictData.value['SRD']?.find(item => item.value == ruleForm.value.yhdh)?.label || '';
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCheckyhdh = () => {
|
||||||
|
ruleForm.value.yhdh = dictData.value['SRD']?.find(item => item.label == ruleForm.value.name)?.value || '';
|
||||||
|
};
|
||||||
|
// 处理确认验证
|
||||||
|
const handleConfirm = () => {
|
||||||
|
ruleFormRef.value.validate((valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
emit('onConfirm', { yhdh: ruleForm.value.yhdh, name: ruleForm.value.name });
|
||||||
|
flag.value = false;
|
||||||
|
checkShow.value = false;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
checkShow.value = false;
|
||||||
|
ruleForm.value.yhdh = '';
|
||||||
|
ruleForm.value.name = '';
|
||||||
|
ruleFormRef.value.resetFields();
|
||||||
|
emit('onCancel');
|
||||||
|
};
|
||||||
|
|
||||||
|
const close = () => {
|
||||||
|
ruleForm.value.yhdh = '';
|
||||||
|
ruleForm.value.name = '';
|
||||||
|
ruleFormRef.value.resetFields();
|
||||||
|
if (flag.value) {
|
||||||
|
emit('onCancel');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@ -23,8 +23,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { set } from '@vueuse/core';
|
|
||||||
import { defineProps, defineEmits, ref, watch } from 'vue';
|
|
||||||
|
|
||||||
// 组件属性
|
// 组件属性
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -130,7 +130,7 @@ export default defineConfig(({
|
|||||||
plugins: [
|
plugins: [
|
||||||
VITE_APP_ENV === 'production' && visualizer({
|
VITE_APP_ENV === 'production' && visualizer({
|
||||||
filename: './node_modules/.cache/visualizer/stats.html',
|
filename: './node_modules/.cache/visualizer/stats.html',
|
||||||
open: true,
|
open: false,
|
||||||
gzipSize: true,
|
gzipSize: true,
|
||||||
brotliSize: true
|
brotliSize: true
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user