核心升级: - 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端点正常
347 lines
8.5 KiB
Vue
Executable File
347 lines
8.5 KiB
Vue
Executable File
<template>
|
|
<div class="app-container">
|
|
<el-form
|
|
ref="earlyWarningRef"
|
|
:model="queryParams"
|
|
:inline="true"
|
|
:rules="rules"
|
|
label-width="100px"
|
|
>
|
|
<el-form-item
|
|
label="药品名称:"
|
|
prop="searchKey"
|
|
>
|
|
<el-input
|
|
v-model="queryParams.searchKey"
|
|
placeholder="请输入药品名称"
|
|
clearable
|
|
style="width: 200px"
|
|
@keyup.enter="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item
|
|
label="效期小于(天):"
|
|
prop="remainingDays"
|
|
label-width="150px"
|
|
>
|
|
<el-input
|
|
v-model="queryParams.remainingDays"
|
|
placeholder="请输入效期小于(天)"
|
|
clearable
|
|
style="width: 200px"
|
|
@keyup.enter="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
|
|
<el-form-item
|
|
label="药品类别:"
|
|
prop="categoryCode"
|
|
>
|
|
<el-select
|
|
v-model="queryParams.categoryCode"
|
|
placeholder="请选择药品类别"
|
|
clearable
|
|
style="width: 150px"
|
|
>
|
|
<el-option
|
|
v-for="categoryCode in item_category_code"
|
|
:key="categoryCode.value"
|
|
:label="categoryCode.label"
|
|
:value="categoryCode.value"
|
|
/>
|
|
</el-select>
|
|
</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="库存件数检查">
|
|
<el-radio-group
|
|
v-model="queryParams.flg"
|
|
@change="handleQuery"
|
|
>
|
|
<el-radio
|
|
label="1"
|
|
:value="1"
|
|
>
|
|
是
|
|
</el-radio>
|
|
<el-radio
|
|
label="0"
|
|
:value="0"
|
|
>
|
|
否
|
|
</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<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-table
|
|
v-loading="loading"
|
|
:data="purchaseinventoryList"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
<el-table-column
|
|
type="selection"
|
|
width="50"
|
|
align="center"
|
|
/>
|
|
<el-table-column
|
|
key="categoryCode_dictText"
|
|
label="药品类别"
|
|
align="center"
|
|
prop="categoryCode_dictText"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="busNo"
|
|
label="药品编码"
|
|
align="center"
|
|
prop="busNo"
|
|
width="140"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="medicineName"
|
|
label="药品名称"
|
|
align="center"
|
|
prop="medicineName"
|
|
width="240"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="totalVolume"
|
|
label="规格"
|
|
align="center"
|
|
prop="totalVolume"
|
|
width="270"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="manufacturerText"
|
|
label="厂家/产地"
|
|
align="center"
|
|
prop="manufacturerText"
|
|
width="320"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="lotNumber"
|
|
label="生产批号"
|
|
align="center"
|
|
prop="lotNumber"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="expirationDate"
|
|
label="有效期至"
|
|
align="center"
|
|
prop="expirationDate"
|
|
width="165"
|
|
:show-overflow-tooltip="true"
|
|
>
|
|
<template #default="scope">
|
|
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
key="remainingDays"
|
|
label="效期(天)"
|
|
align="center"
|
|
prop="remainingDays"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="remainingMonth"
|
|
label="效期(月)"
|
|
align="center"
|
|
prop="remainingMonth"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="minUnitCode_dictText"
|
|
label="库存单位"
|
|
align="center"
|
|
prop="minUnitCode_dictText"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="quantity"
|
|
label="库存量(最小单位)"
|
|
align="center"
|
|
prop="quantity"
|
|
width="150"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="specificationQuantity"
|
|
label="该药总库存(最小单位)"
|
|
align="center"
|
|
prop="specificationQuantity"
|
|
width="170"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="itemMinQuantity"
|
|
label="最小库存警戒量"
|
|
align="center"
|
|
prop="itemMinQuantity"
|
|
width="150"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
<el-table-column
|
|
key="itemMaxQuantity"
|
|
label="最大库存警戒量"
|
|
align="center"
|
|
prop="itemMaxQuantity"
|
|
width="150"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
</el-table>
|
|
<pagination
|
|
v-show="total > 0"
|
|
v-model:page="queryParams.pageNo"
|
|
v-model:limit="queryParams.pageSize"
|
|
:total="total"
|
|
@pagination="getList"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup name="earlyWarning">
|
|
|
|
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 supplyTypeOptions = ref(undefined);
|
|
const supplyStatusOptions = ref(undefined);
|
|
|
|
const data = reactive({
|
|
form: {},
|
|
queryParams: {
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
searchKey: undefined,
|
|
categoryCode: undefined,
|
|
remainingDays: 180,
|
|
expirationDateSTime: undefined,
|
|
expirationDateETime: undefined,
|
|
flg: undefined,
|
|
},
|
|
rules: {
|
|
remainingMonth: [
|
|
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
|
{ validator: validateMaxUnit, trigger: 'blur' },
|
|
],
|
|
},
|
|
});
|
|
|
|
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 getList() {
|
|
loading.value = true;
|
|
const params = {
|
|
...queryParams.value,
|
|
flg: queryParams.value.flg == 1 ? '1' : null,
|
|
};
|
|
// getExpirationWarning(params).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.expirationDateSTime =
|
|
occurrenceTime.value && occurrenceTime.value.length == 2
|
|
? occurrenceTime.value[0] + ' 00:00:00'
|
|
: '';
|
|
queryParams.value.expirationDateETime =
|
|
occurrenceTime.value && occurrenceTime.value.length == 2
|
|
? occurrenceTime.value[1] + ' 23:59:59'
|
|
: '';
|
|
queryParams.value.pageNo = 1;
|
|
getList();
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 清空条件按钮操作 */
|
|
function handleClear() {
|
|
// 清空查询条件
|
|
queryParams.value.expirationDateSTime = '';
|
|
queryParams.value.expirationDateETime = '';
|
|
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;
|
|
}
|
|
|
|
getList();
|
|
</script>
|
|
<style scoped>
|
|
.custom-tree-node {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style> |