条码签收

This commit is contained in:
wuyy 2026-03-20 17:54:28 +08:00
parent eb35f434d8
commit 86d74377d7
5 changed files with 44 additions and 43 deletions

View File

@ -77,7 +77,7 @@
placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="" prop="status">
<SelectTable v-model:data="searchForm.status" :tableData="dictData.ZT" clearable style="width: 9.5rem;"
<SelectTable v-model:data="searchForm.status" :tableData="dictData.SQDZT" clearable style="width: 9.5rem;"
placeholder="请选择状态" size="small" @getDataValue="handleQuery" />
</el-form-item>
@ -567,7 +567,7 @@ const itemclassList = ref([]) // 容器类别
onMounted(() => {
changeDays(3)
getXmList()
getDictData('PT', 'SX', 'AU', 'ZT', 'ZJLX', 'DEPT', 'DOCTOR', 'SLZQ', 'BT')
getDictData('PT', 'SX', 'AU', 'ZT', 'ZJLX', 'DEPT', 'DOCTOR', 'SLZQ', 'BT', 'SQDZT')
listregdict({ dictType: 'CLASS' }).then(response => {
xmdlList.value = response.rows;
activeName.value = xmdlList.value.length > 0 ? xmdlList.value[0].dictCode : '';

View File

@ -158,7 +158,7 @@ watch(
);
const handleChange = (value) => {
const item = selectOptions.value.find(item => item.id === value);
const item = selectOptions.value.find(item => item.id == value);
loginForm.value.loginParam.loginYLJG = value;
loginForm.value.loginParam.loginYLJGName = item?.name || '';
}

View File

@ -116,20 +116,20 @@ import { getDictData, formatDict, dictData } from '@/hooks'
const userStore = useUserStore()
const queryParams: any = ref({
const queryParams = ref({
pageSize: 50,
pageNum: 1,
srcHospName: userStore.sysLoginParam.loginYLJGName,
times: []
})
const tableData: any = ref([])
const columns: any = ref([
const tableData = ref([])
const columns = ref([
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, width: 150 },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 250 },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 100 },
{ 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: 300 },
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 250 },
{ prop: 'sampleTypeName', label: '标本类型', align: 'center', visible: true, },
{ prop: 'itemclass_tips', label: '采集容器', align: 'center', visible: true, },
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
@ -211,7 +211,7 @@ const sizeChange = (page: { currentPage: number, pageSize: number }) => {
handleQuery()
}
const rowHandle = (row: any) => {
const rowHandle = (row) => {
timelineItems.value =
[
{ title: '检验申请', time: row.orderTime },
@ -225,7 +225,7 @@ const rowHandle = (row: any) => {
const tableRefs = ref()
const getList = () => {
querySample(queryParams.value).then((res: any) => {
querySample(queryParams.value).then((res) => {
tableData.value = res.rows
pagination.value.total = res.total
tableRefs.value.setCurrentRow(res.rows[0])
@ -240,12 +240,12 @@ const getDays = () => {
}
const hosList = ref([])
const regdictList: any = ref([])
const regdictList = ref([])
onMounted(() => {
getDays()
handleQuery()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
listhospital().then((res) => {
hosList.value = res.rows.map((item) => {
return {
label: item.hospitalName,
value: item.hospitalCode
@ -253,7 +253,7 @@ onMounted(() => {
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res) => {
regdictList.value = res.rows;
})
getDictData('AU')
@ -261,7 +261,7 @@ onMounted(() => {
const formatDicts = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
return arr.find((item) => item.dictCode == v)?.dictName || v;
};
</script>

View File

@ -91,14 +91,15 @@ const userStore = useUserStore()
const aotuSize = classCom.useAutoSize();
import { useRouter } from 'vue-router'
const router = useRouter()
const queryParams: any = ref({
const queryParams = ref({
pageSize: 50,
pageNum: 1,
srcHospName: userStore.sysLoginParam.loginYLJGName,
times: []
times: [],
status: 50
})
const tableData: any = ref([])
const columns: any = ref([
const tableData = ref([])
const columns = ref([
{ type: 'selection', align: 'center', visible: true, width: 40 },
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, width: 150 },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 250 },
@ -133,8 +134,8 @@ const ksdhFields = ref([
])
const barcodes = ref([])
const tableRefs = ref(null)
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
const handleSelectionChange = (val) => {
barcodes.value = val.map((item) => item.barcode)
}
const backReasons = ref('')
const bbThHandle = () => {
@ -155,7 +156,7 @@ const bbThHandle = () => {
//标本签收
const qsHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
sampleSign({ status: val, barcode: barcodes.value, backReasons: backReasons.value }).then((res: any) => {
sampleSign({ status: val, barcode: barcodes.value, backReasons: backReasons.value }).then((res) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
backReasons.value = ''
@ -199,7 +200,7 @@ const handleQuery = () => {
}
const getList = () => {
querySampleSign(queryParams.value).then((res: any) => {
querySampleSign(queryParams.value).then((res) => {
tableData.value = res.rows
pagination.value.total = res.total
})
@ -211,11 +212,11 @@ const getDays = () => {
}
const hosList = ref([])
const regdictList: any = ref([])
const regdictList = ref([])
onMounted(() => {
getDays()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
listhospital().then((res) => {
hosList.value = res.rows.map((item) => {
return {
label: item.hospitalName,
value: item.hospitalCode
@ -223,7 +224,7 @@ onMounted(() => {
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res) => {
regdictList.value = res.rows;
})
getDictData('AU')
@ -232,7 +233,7 @@ onMounted(() => {
const formatDicts = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
return arr.find((item) => item.dictCode == v)?.dictName || v;
};
</script>

View File

@ -48,11 +48,11 @@ import dayjs from 'dayjs';
import { getDictData, formatDict, dictData } from '@/hooks'
const aotuSize = classCom.useAutoSize();
const queryParams: any = ref({
const queryParams = ref({
barcode: '',
})
const tableData: any = ref([])
const columns: any = ref([
const tableData = ref([])
const columns = ref([
{ type: 'selection', align: 'center', visible: true, width: 40 },
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 250 },
@ -83,15 +83,15 @@ const dstHospName = ref('')
const dstHospCode = ref('')
const barcodes = ref([])
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
const handleSelectionChange = (val) => {
barcodes.value = val.map((item) => item.barcode)
}
const getValue = (val: any) => {
const getValue = (val) => {
dstHospName.value = val.label
}
const sjHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
if (!dstHospCode.value) return ElMessage.warning('请选择送检医院!')
if (val == 30 && !dstHospCode.value) return ElMessage.warning('请选择送检医院!')
const params = {
barcode: barcodes.value,
dstHospName: dstHospName.value,
@ -99,7 +99,7 @@ const sjHandle = (val: number) => {
status: val
}
sampleSign(params).then((res: any) => {
sampleSign(params).then((res) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
dstHospCode.value = ''
@ -120,24 +120,24 @@ const sjHandle = (val: number) => {
const getList = () => {
const index = tableData.value.findIndex((item: any) => item.barcode == queryParams.value.barcode)
const index = tableData.value.findIndex((item) => item.barcode == queryParams.value.barcode)
if (index != -1) {
ElMessage.warning('条码号已存在!')
return
}
sampleCollect({ barcode: queryParams.value.barcode }).then((res: any) => {
sampleCollect({ barcode: queryParams.value.barcode }).then((res) => {
tableData.value.push(res.data)
queryParams.value.barcode = ''
})
}
const hosList = ref([])
const regdictList: any = ref([])
const regdictList = ref([])
onMounted(() => {
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
listhospital().then((res) => {
hosList.value = res.rows.map((item) => {
return {
label: item.hospitalName,
value: item.hospitalCode
@ -145,14 +145,14 @@ onMounted(() => {
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res) => {
regdictList.value = res.rows;
})
getDictData('AU')
})
const formatDicts = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
return arr.find((item) => item.dictCode == v)?.dictName || v;
};
</script>