耗材入口采购不显示耗材库
This commit is contained in:
@@ -73,6 +73,16 @@ public class CommonAppController {
|
|||||||
return R.ok(commonService.getInventoryCabinetList());
|
return R.ok(commonService.getInventoryCabinetList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗材库列表
|
||||||
|
*
|
||||||
|
* @return 耗材库列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/warehouse-list")
|
||||||
|
public R<?> getWarehouseList() {
|
||||||
|
return R.ok(commonService.getWarehouseList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药房药库列表
|
* 药房药库列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -95,9 +95,9 @@
|
|||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
v-model:page="queryParams.pageNum"
|
v-model:page="queryParams.pageNo"
|
||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getPageList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
@@ -152,6 +152,8 @@ const loading = ref(true);
|
|||||||
const organization = ref([]);
|
const organization = ref([]);
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
locationFormList: [11, 16, 17],
|
locationFormList: [11, 16, 17],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
const form = ref({
|
const form = ref({
|
||||||
|
|||||||
@@ -120,6 +120,14 @@ export function getDispensaryListAll() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取耗材库列表
|
||||||
|
export function getWarehouseListAll() {
|
||||||
|
return request({
|
||||||
|
url: '/app-common/warehouse-list',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审批驳回
|
* 审批驳回
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -697,6 +697,7 @@ import {
|
|||||||
getInitBusNo,
|
getInitBusNo,
|
||||||
getPharmacyList,
|
getPharmacyList,
|
||||||
getPharmacyListAll,
|
getPharmacyListAll,
|
||||||
|
getWarehouseListAll,
|
||||||
purchaseInventoryApproved,
|
purchaseInventoryApproved,
|
||||||
reject,
|
reject,
|
||||||
submitApproval,
|
submitApproval,
|
||||||
@@ -1273,30 +1274,29 @@ function handleChangeLocationType(value) {
|
|||||||
locationList.value = [];
|
locationList.value = [];
|
||||||
});
|
});
|
||||||
} else if (value == 17) {
|
} else if (value == 17) {
|
||||||
// 耗材库类型 - 确保只显示中心耗材库
|
// 耗材库类型 - 从后端获取所有 form_enum=17 的耗材库
|
||||||
console.log("选择了耗材库类型,设置中心耗材库");
|
console.log("选择了耗材库类型,获取耗材库列表");
|
||||||
|
|
||||||
// 只设置一个硬编码的中心耗材库,使用数字ID避免类型转换错误
|
getWarehouseListAll()
|
||||||
const centralSupplyWarehouse = {
|
|
||||||
id: 1, // 使用数字ID而不是字符串
|
|
||||||
locationStoreId: 1, // 使用数字ID而不是字符串
|
|
||||||
locationStoreName: "中心耗材库",
|
|
||||||
formEnum: "17",
|
|
||||||
storeName: "中心耗材库",
|
|
||||||
name: "中心耗材库",
|
|
||||||
};
|
|
||||||
|
|
||||||
// 直接设置locationList只包含中心耗材库
|
|
||||||
locationList.value = [centralSupplyWarehouse];
|
|
||||||
console.log("已设置仅包含中心耗材库的列表");
|
|
||||||
|
|
||||||
// 可选:如果需要在后台记录日志,可以保留获取数据的逻辑但不覆盖显示
|
|
||||||
getPharmacyListAll()
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("后台获取仓库数据(仅供参考,不影响显示):", res?.data?.length || 0);
|
const warehouses = res?.data || [];
|
||||||
|
console.log("===== 耗材库数据获取结果 =====");
|
||||||
|
console.log("获取到的耗材库数量:", warehouses.length);
|
||||||
|
console.log("耗材库列表:", warehouses);
|
||||||
|
|
||||||
|
// 直接使用获取到的耗材库数据
|
||||||
|
locationList.value = warehouses;
|
||||||
|
|
||||||
|
// 如果没有找到耗材库,显示提示信息
|
||||||
|
if (warehouses.length === 0) {
|
||||||
|
console.warn("未获取到任何耗材库数据");
|
||||||
|
proxy.$message.warning("未找到可用的耗材库,请先在库房管理中添加耗材库");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("后台获取仓库数据失败(不影响显示):", error);
|
console.error("获取耗材库列表失败:", error);
|
||||||
|
locationList.value = [];
|
||||||
|
proxy.$message.error("获取耗材库列表失败");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user