核心升级: - Spring Boot 2.7.18 → 3.5.14 - MyBatis Plus 3.5.5 → 3.5.16 (spring-boot3-starter) - Springdoc 1.8.0 → 2.8.6 (OpenAPI 3) - Flowable 6.8.0 → 7.1.0 - Druid 1.2.x → 1.2.28 (boot3-starter) - kotlin-reflect 1.9.10 → 1.9.25 迁移适配: - javax → jakarta 命名空间 (620+ 文件) - Swagger 注解迁移到 OpenAPI 3 (@Tag/@Schema/@Operation/@Parameter) - Spring Security 6.2 适配 (antMatchers→requestMatchers, EnableMethodSecurity) - Druid 包名迁移 (boot→boot3) - Redis 配置路径迁移 (spring.redis→spring.data.redis) - Flyway 适配 (flyway-database-postgresql) - Flowable 7.x 适配 (MULE_TASK_IMAGE 移除) 修复: - spring-boot-maven-plugin 2.5.15→3.5.14 (SPI服务发现失效) - mybatis-plus-boot-starter 3.5.5→3.5.16 (kotlin-reflect+fastjson2冲突) - Flowable database-schema-update 启用自动建表 验证: 23/23 测试通过, 1374 API端点正常
362 lines
9.6 KiB
Vue
Executable File
362 lines
9.6 KiB
Vue
Executable File
<template>
|
|
<div class="app-container">
|
|
<el-form
|
|
ref="earlyWarningRef"
|
|
:model="queryParams"
|
|
:inline="true"
|
|
:rules="rules"
|
|
label-width="140px"
|
|
>
|
|
<el-form-item
|
|
label="追溯码:"
|
|
prop="searchKey"
|
|
label-width="120px"
|
|
>
|
|
<el-input
|
|
v-model="queryParams.searchKey"
|
|
placeholder="请输入药品名称/追溯码"
|
|
clearable
|
|
style="width: 200px"
|
|
@keyup.enter="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="进出时间:">
|
|
<el-date-picker
|
|
v-model="occurrenceTime"
|
|
type="daterange"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期"
|
|
style="width: 300px"
|
|
value-format="YYYY-MM-DD"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item
|
|
label="追溯码状态:"
|
|
prop="statusEnum"
|
|
label-width="120px"
|
|
>
|
|
<el-select
|
|
v-model="queryParams.statusEnum"
|
|
placeholder="请选择追溯码状态"
|
|
clearable
|
|
style="width: 200px"
|
|
>
|
|
<el-option
|
|
v-for="traceNoStatus in traceNoStatusOptions"
|
|
:key="traceNoStatus.value"
|
|
:label="traceNoStatus.label"
|
|
:value="traceNoStatus.value"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item
|
|
label="操作类型:"
|
|
prop="operationType"
|
|
label-width="120px"
|
|
>
|
|
<el-select
|
|
v-model="queryParams.operationType"
|
|
placeholder="请选择操作类型"
|
|
clearable
|
|
style="width: 200px"
|
|
>
|
|
<el-option
|
|
v-for="operationType in operationTypeOptions"
|
|
:key="operationType.value"
|
|
:label="operationType.label"
|
|
:value="operationType.value"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-row
|
|
:gutter="10"
|
|
class="mb8"
|
|
>
|
|
<el-col :span="1.5">
|
|
<!-- v-hasPermi="['system:user:import']" -->
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
icon="Search"
|
|
@click="handleQuery"
|
|
>
|
|
查询
|
|
</el-button>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<!-- v-hasPermi="['system:user:export']" -->
|
|
<el-button
|
|
type="warning"
|
|
plain
|
|
icon="CircleClose"
|
|
@click="handleClear"
|
|
>
|
|
重置
|
|
</el-button>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="purchaseinventoryList"
|
|
@selection-change="handleSelectionChange"
|
|
@cell-click="onClickCell"
|
|
>
|
|
<el-table-column
|
|
type="selection"
|
|
width="50"
|
|
align="center"
|
|
/>
|
|
<el-table-column
|
|
key="name"
|
|
label="药品名"
|
|
align="center"
|
|
prop="name"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="locationName"
|
|
label="药房药库"
|
|
align="center"
|
|
prop="locationName"
|
|
width="140"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="lotNumber"
|
|
label="产品批号"
|
|
align="center"
|
|
prop="lotNumber"
|
|
width="120"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="traceNo"
|
|
label="追溯码"
|
|
align="center"
|
|
prop="traceNo"
|
|
width="200"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="statusEnum_enumText"
|
|
label="追溯码状态"
|
|
align="center"
|
|
prop="statusEnum_enumText"
|
|
width="140"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="unitCode_dictText"
|
|
label="追溯码单位"
|
|
align="center"
|
|
prop="unitCode_dictText"
|
|
width="140"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="operationType_enumText"
|
|
label="操作类型"
|
|
align="center"
|
|
prop="operationType_enumText"
|
|
width="165"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="itemType_enumText"
|
|
label="项目类型"
|
|
align="center"
|
|
prop="itemType_enumText"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="createTime"
|
|
label="进出时间"
|
|
align="center"
|
|
prop="createTime"
|
|
:show-overflow-tooltip="true"
|
|
width="180"
|
|
/>
|
|
</el-table>
|
|
<pagination
|
|
v-show="total > 0"
|
|
v-model:page="queryParams.pageNo"
|
|
v-model:limit="queryParams.pageSize"
|
|
:total="total"
|
|
@pagination="getList"
|
|
/>
|
|
<el-dialog
|
|
v-model="dialogVisible"
|
|
title="追溯详情"
|
|
width="80%"
|
|
>
|
|
<traceabilityPersonInfo :info-id-params="infoIdParams" />
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup name="earlyWarning">
|
|
import {inventoryReceiptPage, traceabilityCodeManagementInit} from './statisticalManagent';
|
|
import {nextTick, onMounted} from 'vue';
|
|
import {formatDateStr} from '@/utils';
|
|
import traceabilityPersonInfo from './traceabilityPersonInfo.vue';
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const { item_category_code } = proxy.useDict('item_category_code');
|
|
|
|
const purchaseinventoryList = ref([]);
|
|
const loading = ref(true);
|
|
const occurrenceTime = ref([]);
|
|
const ids = ref([]);
|
|
const single = ref(true);
|
|
const multiple = ref(true);
|
|
const total = ref(0);
|
|
const locationIdList = ref(undefined);
|
|
const traceNoStatusOptions = ref(undefined);
|
|
const operationTypeOptions = ref(undefined);
|
|
const itemTypeOptions = ref(undefined);
|
|
const dialogVisible = ref(false);
|
|
const infoIdParams = ref();
|
|
|
|
const props = defineProps({
|
|
recordInfo: {
|
|
type: Object,
|
|
required: true,
|
|
default: () => ({}),
|
|
},
|
|
});
|
|
|
|
const data = reactive({
|
|
form: {},
|
|
queryParams: {
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
searchKey: undefined,
|
|
categoryCode: undefined,
|
|
remainingMonth: undefined,
|
|
createTimeSTime: undefined,
|
|
createTimeETime: undefined,
|
|
},
|
|
rules: {
|
|
remainingMonth: [
|
|
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
|
{ validator: validateMaxUnit, trigger: 'blur' },
|
|
],
|
|
},
|
|
});
|
|
|
|
onMounted(() => {
|
|
setDefaultDateRange();
|
|
getList();
|
|
});
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
function validateMaxUnit(rule, value, callback) {
|
|
const numberRegex = /^[0-9]+$/; // 正则表达式,确保输入为数字
|
|
if (!numberRegex.test(value)) {
|
|
callback(new Error('请输入有效的数字'));
|
|
} else {
|
|
callback();
|
|
}
|
|
}
|
|
function setDefaultDateRange() {
|
|
const today = new Date();
|
|
const oneMonthAgo = new Date(today);
|
|
oneMonthAgo.setMonth(today.getMonth() - 1);
|
|
occurrenceTime.value = [
|
|
formatDateStr(oneMonthAgo, 'YYYY-MM-DD'),
|
|
formatDateStr(today, 'YYYY-MM-DD'),
|
|
];
|
|
queryParams.value.createTimeSTime =
|
|
occurrenceTime.value && occurrenceTime.value.length == 2
|
|
? occurrenceTime.value[0] + ' 00:00:00'
|
|
: '';
|
|
queryParams.value.createTimeETime =
|
|
occurrenceTime.value && occurrenceTime.value.length == 2
|
|
? occurrenceTime.value[1] + ' 23:59:59'
|
|
: '';
|
|
}
|
|
function getInit() {
|
|
traceabilityCodeManagementInit().then((res) => {
|
|
locationIdList.value = res.data.locationOptions;
|
|
traceNoStatusOptions.value = res.data.traceNoStatusOptions;
|
|
operationTypeOptions.value = res.data.operationTypeOptions;
|
|
itemTypeOptions.value = res.data.itemTypeOptions;
|
|
});
|
|
}
|
|
/** 查询调拨管理项目列表 */
|
|
function getList() {
|
|
loading.value = true;
|
|
queryParams.value.locationId = props.recordInfo.locationId;
|
|
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
|
queryParams.value.itemTable = props.recordInfo.itemTable;
|
|
queryParams.value.itemId = props.recordInfo.itemId;
|
|
inventoryReceiptPage(queryParams.value).then((res) => {
|
|
loading.value = false;
|
|
purchaseinventoryList.value = res.data.records;
|
|
total.value = res.data.total;
|
|
});
|
|
}
|
|
|
|
/** 搜索按钮操作 */
|
|
function handleQuery() {
|
|
proxy.$refs['earlyWarningRef'].validate((valid) => {
|
|
if (valid) {
|
|
queryParams.value.createTimeSTime =
|
|
occurrenceTime.value && occurrenceTime.value.length == 2
|
|
? occurrenceTime.value[0] + ' 00:00:00'
|
|
: '';
|
|
queryParams.value.createTimeETime =
|
|
occurrenceTime.value && occurrenceTime.value.length == 2
|
|
? occurrenceTime.value[1] + ' 23:59:59'
|
|
: '';
|
|
queryParams.value.locationId = props.recordInfo.locationId;
|
|
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
|
queryParams.value.itemTable = props.recordInfo.itemTable;
|
|
queryParams.value.itemId = props.recordInfo.itemId;
|
|
queryParams.value.pageNo = 1;
|
|
getList();
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 清空条件按钮操作 */
|
|
function handleClear() {
|
|
// 清空查询条件
|
|
queryParams.value.createTimeSTime = '';
|
|
queryParams.value.createTimeETime = '';
|
|
occurrenceTime.value = '';
|
|
proxy.resetForm('earlyWarningRef');
|
|
getList();
|
|
}
|
|
|
|
/** 选择条数 */
|
|
function handleSelectionChange(selection) {
|
|
ids.value = selection.map((item) => item.id);
|
|
single.value = selection.length != 1;
|
|
multiple.value = !selection.length;
|
|
}
|
|
// 点击当前条数触发
|
|
const onClickCell = (row) => {
|
|
// console.log('@@@@@=======>', JSON.stringify(row));
|
|
dialogVisible.value = true;
|
|
nextTick(() => {
|
|
infoIdParams.value = {
|
|
id: row.id,
|
|
};
|
|
});
|
|
};
|
|
getInit();
|
|
</script>
|
|
<style scoped>
|
|
.custom-tree-node {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style>
|