[bug]解决选中药库或药房对应的源仓库或目的仓库无下拉数据
This commit is contained in:
@@ -797,6 +797,25 @@ watch(
|
||||
{ immediate: true }
|
||||
);
|
||||
onMounted(() => {
|
||||
document.addEventListener("click", handleClickOutside);
|
||||
|
||||
// 获取源仓库列表(假设 getPharmacyList 返回仓库数据)
|
||||
getPharmacyList({ type: 'source' }).then(res => {
|
||||
if (res.code === 200) {
|
||||
sourceTypeListOptions.value = res.data; // 格式需为 [{id, name}, ...]
|
||||
}
|
||||
});
|
||||
|
||||
// 获取目的仓库列表
|
||||
getPharmacyList({ type: 'purpose' }).then(res => {
|
||||
if (res.code === 200) {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
}
|
||||
});
|
||||
|
||||
// 初始化默认仓库数据,使用药房类型(16)
|
||||
handleChangeLocationType(16);
|
||||
|
||||
console.log(route, '!1212');
|
||||
if (route.query.view) {
|
||||
viewStatus.value = route.query.view;
|
||||
@@ -1138,7 +1157,7 @@ function handleChangeLocationType(value) {
|
||||
locationList.value = list;
|
||||
}
|
||||
});
|
||||
} else if (value == 11) {
|
||||
} else if (value == 17) {
|
||||
getDispensaryList().then((res) => {
|
||||
const list = res?.data || [];
|
||||
if (!list.length) {
|
||||
|
||||
Reference in New Issue
Block a user