fix: 🧩 修复金蝶仓库和子仓库options无法清空
This commit is contained in:
@@ -29,3 +29,19 @@ export const getProductLinesApi = (params: any) => {
|
|||||||
export const getWarehousesListApi = () => {
|
export const getWarehousesListApi = () => {
|
||||||
return http.get<any>(`basicinfo/warehouses`);
|
return http.get<any>(`basicinfo/warehouses`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//获取金蝶仓库
|
||||||
|
export const getWarehousesKingdeeListApi = (params: any) => {
|
||||||
|
return http.get<any>(`basicinfo/warehouses/kingdee`, params);
|
||||||
|
};
|
||||||
|
//获取金蝶子仓库
|
||||||
|
export const getSubwarehouseskingdeeListApi = (params: any) => {
|
||||||
|
return http.get<any>(`basicinfo/subwarehouses/kingdee`, params);
|
||||||
|
};
|
||||||
|
//获取聚水潭仓库 /admapi/basicinfo/warehouses/jushuitan
|
||||||
|
export const getWarehousesJushuitanListApi = (params: any) => {
|
||||||
|
return http.get<any>(`basicinfo/warehouses/jushuitan`, params);
|
||||||
|
};
|
||||||
|
export const getWarehousesLingXingListApi = (params: any) => {
|
||||||
|
return http.get<any>(`basicinfo/warehouses/lingxing`, params);
|
||||||
|
};
|
||||||
|
|||||||
@@ -22,18 +22,18 @@ export const getWarehouseDetailsApi = (id: any) => {
|
|||||||
return http.get<any>(`warehouse/relationship/${id}`);
|
return http.get<any>(`warehouse/relationship/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
//获取金蝶仓库
|
// //获取金蝶仓库
|
||||||
export const getSetWarehouseKingdeeListApi = (params: any) => {
|
// export const getSetWarehouseKingdeeListApi = (params: any) => {
|
||||||
return http.get<any>(`basicinfo/warehouses/kingdee`, params);
|
// return http.get<any>(`basicinfo/warehouses/kingdee`, params);
|
||||||
};
|
// };
|
||||||
//获取金蝶子仓库
|
// //获取金蝶子仓库
|
||||||
export const getSetWarehouseSubwarehousesListApi = (params: any) => {
|
// export const getSetWarehouseSubwarehousesListApi = (params: any) => {
|
||||||
return http.get<any>(`basicinfo/subwarehouses/kingdee`, params);
|
// return http.get<any>(`basicinfo/subwarehouses/kingdee`, params);
|
||||||
};
|
// };
|
||||||
//获取聚水潭仓库 /admapi/basicinfo/warehouses/jushuitan
|
// //获取聚水潭仓库 /admapi/basicinfo/warehouses/jushuitan
|
||||||
export const getSetWarehouseSubwarehousesJushuitanListApi = (params: any) => {
|
// export const getSetWarehouseSubwarehousesJushuitanListApi = (params: any) => {
|
||||||
return http.get<any>(`basicinfo/warehouses/jushuitan`, params);
|
// return http.get<any>(`basicinfo/warehouses/jushuitan`, params);
|
||||||
};
|
// };
|
||||||
export const getSetWarehouseSubwarehousesLingXingListApi = (params: any) => {
|
// export const getSetWarehouseSubwarehousesLingXingListApi = (params: any) => {
|
||||||
return http.get<any>(`basicinfo/warehouses/lingxing`, params);
|
// return http.get<any>(`basicinfo/warehouses/lingxing`, params);
|
||||||
};
|
// };
|
||||||
|
|||||||
@@ -183,8 +183,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="SearchForm">
|
<script setup lang="ts" name="SearchForm">
|
||||||
import { verificationInput } from "./components/utils/verificationInput";
|
import { verificationInput } from "./components/utils/verificationInput";
|
||||||
import { getSupplierApi, getCustomersApi, getProductLinesApi } from "@/api/modules/global";
|
import {
|
||||||
import { getSetWarehouseKingdeeListApi, getSetWarehouseSubwarehousesListApi } from "@/api/modules/setWarehouse";
|
getSupplierApi,
|
||||||
|
getCustomersApi,
|
||||||
|
getProductLinesApi,
|
||||||
|
getWarehousesKingdeeListApi,
|
||||||
|
getSubwarehouseskingdeeListApi
|
||||||
|
} from "@/api/modules/global";
|
||||||
|
// // getWarehousesKingdeeListApi getSubwarehouseskingdeeListApi getWarehousesJushuitanListApi getWarehousesLingXingListApi
|
||||||
|
// import { getWarehousesKingdeeListApi, getSubwarehouseskingdeeListApi } from "@/api/modules/setWarehouse";
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
formData: any[];
|
formData: any[];
|
||||||
searchParams: Record<string, any>;
|
searchParams: Record<string, any>;
|
||||||
@@ -269,49 +276,49 @@ const getProductLines = async (keywords: any, item: any) => {
|
|||||||
|
|
||||||
//金蝶仓库
|
//金蝶仓库
|
||||||
const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
||||||
item.options = [];
|
|
||||||
let use_org_number = "";
|
|
||||||
if (Array.isArray(_searchParams.value.use_org_number) ** _searchParams.value.use_org_number.length) {
|
if (Array.isArray(_searchParams.value.use_org_number) ** _searchParams.value.use_org_number.length) {
|
||||||
|
item.options = [];
|
||||||
|
let use_org_number = "";
|
||||||
use_org_number = _searchParams.value.use_org_number.join(",");
|
use_org_number = _searchParams.value.use_org_number.join(",");
|
||||||
}
|
const result = await getWarehousesKingdeeListApi({
|
||||||
const result = await getSetWarehouseKingdeeListApi({
|
keywords: keywords,
|
||||||
keywords: keywords,
|
use_org_number
|
||||||
use_org_number
|
|
||||||
});
|
|
||||||
if (result?.code === 0) {
|
|
||||||
let options: any = [];
|
|
||||||
result?.data?.forEach((it: any) => {
|
|
||||||
options.push({
|
|
||||||
label: it.warehouse_name,
|
|
||||||
value: it.warehouse_number,
|
|
||||||
use_org_number: it.use_org_number
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
item.options = options;
|
if (result?.code === 0) {
|
||||||
|
let options: any = [];
|
||||||
|
result?.data?.forEach((it: any) => {
|
||||||
|
options.push({
|
||||||
|
label: it.warehouse_name,
|
||||||
|
value: it.warehouse_number,
|
||||||
|
use_org_number: it.use_org_number
|
||||||
|
});
|
||||||
|
});
|
||||||
|
item.options = options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//获取金蝶子仓库
|
//获取金蝶子仓库
|
||||||
const getSetWarehouseSubwarehousesList = async (keywords: any, item: any) => {
|
const getSetWarehouseSubwarehousesList = async (keywords: any, item: any) => {
|
||||||
//先清空一下
|
if (Array.isArray(_searchParams?.value?.kd_warehouse_number) ** _searchParams?.value?.kd_warehouse_number?.length) {
|
||||||
item.options = [];
|
//先清空一下
|
||||||
let kd_warehouse_number = "";
|
item.options = [];
|
||||||
if (Array.isArray(_searchParams.value.kd_warehouse_number) ** _searchParams.value.kd_warehouse_number.length) {
|
let kd_warehouse_number = "";
|
||||||
kd_warehouse_number = _searchParams.value.kd_warehouse_number.join(",");
|
kd_warehouse_number = _searchParams.value.kd_warehouse_number.join(",");
|
||||||
}
|
const result = await getSubwarehouseskingdeeListApi({
|
||||||
const result = await getSetWarehouseSubwarehousesListApi({
|
keywords,
|
||||||
keywords,
|
warehouse_number: kd_warehouse_number
|
||||||
warehouse_number: kd_warehouse_number
|
|
||||||
});
|
|
||||||
if (result?.code === 0) {
|
|
||||||
let options: any = [];
|
|
||||||
result?.data?.forEach((it: any) => {
|
|
||||||
options.push({
|
|
||||||
label: it.sub_warehouse_name,
|
|
||||||
value: it.sub_warehouse_number,
|
|
||||||
warehouse_number: it.warehouse_number
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
item.options = options;
|
if (result?.code === 0) {
|
||||||
|
let options: any = [];
|
||||||
|
result?.data?.forEach((it: any) => {
|
||||||
|
options.push({
|
||||||
|
label: it.sub_warehouse_name,
|
||||||
|
value: it.sub_warehouse_number,
|
||||||
|
warehouse_number: it.warehouse_number
|
||||||
|
});
|
||||||
|
});
|
||||||
|
item.options = options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ const breadcrumbList = computed(() => {
|
|||||||
item.meta.title = route.query.title;
|
item.meta.title = route.query.title;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log("");
|
}
|
||||||
|
if (route.query.title === "新增仓位找货优先级" || "编辑仓位找货优先级") {
|
||||||
|
breadcrumbData.forEach((item: any) => {
|
||||||
|
if (item.name === "foundationSetGoodsAdd") {
|
||||||
|
item.meta.title = route.query.title;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return breadcrumbData;
|
return breadcrumbData;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import PermissionButton from "@/components/PermissionButton/index.vue";
|
|||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
|
// import { getWarehousesListApi } from "@/api/modules/global";
|
||||||
// 表格TS
|
// 表格TS
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ const selectionChange = (selection: any) => {
|
|||||||
// 顶部按钮点击事件
|
// 顶部按钮点击事件
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
$router.push({ path: "/foundation/set/goods/add" });
|
$router.push({ path: "/foundation/set/goods/add", query: { title: "编辑仓位找货优先级" } });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ const selectionChange = (selection: any) => {
|
|||||||
};
|
};
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
const { type } = item;
|
const { type } = item;
|
||||||
|
|
||||||
btnClick[type]({
|
btnClick[type]({
|
||||||
selectionList: dataStore.selectionList,
|
selectionList: dataStore.selectionList,
|
||||||
proTableRef,
|
proTableRef,
|
||||||
|
|||||||
@@ -61,12 +61,15 @@ import {
|
|||||||
getWarehouseDelApi,
|
getWarehouseDelApi,
|
||||||
getWarehouseAddApi,
|
getWarehouseAddApi,
|
||||||
getWarehouseUpApi,
|
getWarehouseUpApi,
|
||||||
getWarehouseDetailsApi,
|
getWarehouseDetailsApi
|
||||||
getSetWarehouseKingdeeListApi,
|
|
||||||
getSetWarehouseSubwarehousesListApi,
|
|
||||||
getSetWarehouseSubwarehousesLingXingListApi,
|
|
||||||
getSetWarehouseSubwarehousesJushuitanListApi
|
|
||||||
} from "@/api/modules/setWarehouse";
|
} from "@/api/modules/setWarehouse";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getWarehousesKingdeeListApi,
|
||||||
|
getSubwarehouseskingdeeListApi,
|
||||||
|
getWarehousesJushuitanListApi,
|
||||||
|
getWarehousesLingXingListApi
|
||||||
|
} from "@/api/modules/global";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA } from "./constant/list/details";
|
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA } from "./constant/list/details";
|
||||||
@@ -176,7 +179,7 @@ const getWarehouseDetails = async (id: any) => {
|
|||||||
//获取金蝶仓库
|
//获取金蝶仓库
|
||||||
const getSetWarehouseKingdeeList = async () => {
|
const getSetWarehouseKingdeeList = async () => {
|
||||||
dataStore.detailsFormData[1].options = [];
|
dataStore.detailsFormData[1].options = [];
|
||||||
const result = await getSetWarehouseKingdeeListApi({ use_org_number: dataStore.detailsRuleForm.use_org_number });
|
const result = await getWarehousesKingdeeListApi({ use_org_number: dataStore.detailsRuleForm.use_org_number });
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((item: any) => {
|
result?.data?.forEach((item: any) => {
|
||||||
@@ -192,7 +195,7 @@ const getSetWarehouseKingdeeList = async () => {
|
|||||||
const getSetWarehouseSubwarehousesList = async () => {
|
const getSetWarehouseSubwarehousesList = async () => {
|
||||||
//先清空一下
|
//先清空一下
|
||||||
dataStore.detailsFormData[2].options = [];
|
dataStore.detailsFormData[2].options = [];
|
||||||
const result = await getSetWarehouseSubwarehousesListApi({
|
const result = await getSubwarehouseskingdeeListApi({
|
||||||
warehouse_number: dataStore.detailsRuleForm.kd_warehouse_number
|
warehouse_number: dataStore.detailsRuleForm.kd_warehouse_number
|
||||||
});
|
});
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
@@ -209,7 +212,7 @@ const getSetWarehouseSubwarehousesList = async () => {
|
|||||||
|
|
||||||
//获取领星仓库
|
//获取领星仓库
|
||||||
const getSetWarehouseSubwarehousesLingXingList = async () => {
|
const getSetWarehouseSubwarehousesLingXingList = async () => {
|
||||||
const result = await getSetWarehouseSubwarehousesLingXingListApi();
|
const result = await getWarehousesLingXingListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((item: any) => {
|
result?.data?.forEach((item: any) => {
|
||||||
@@ -223,7 +226,7 @@ const getSetWarehouseSubwarehousesLingXingList = async () => {
|
|||||||
};
|
};
|
||||||
//获取聚水潭仓库
|
//获取聚水潭仓库
|
||||||
const getSetWarehouseSubwarehousesJushuitanList = async () => {
|
const getSetWarehouseSubwarehousesJushuitanList = async () => {
|
||||||
const result = await getSetWarehouseSubwarehousesJushuitanListApi();
|
const result = await getWarehousesJushuitanListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((item: any) => {
|
result?.data?.forEach((item: any) => {
|
||||||
@@ -305,6 +308,8 @@ const handleSelectMultipleDClear = (params: any) => {
|
|||||||
item: { prop }
|
item: { prop }
|
||||||
} = params;
|
} = params;
|
||||||
dataStore.detailsRuleForm[prop] = "";
|
dataStore.detailsRuleForm[prop] = "";
|
||||||
|
// if(dataStore.)
|
||||||
|
// console.log("1232322222222");
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 监听查询条件标签关闭(统一处理组织、仓库、子仓库联动,修复split类型错误)
|
* 监听查询条件标签关闭(统一处理组织、仓库、子仓库联动,修复split类型错误)
|
||||||
@@ -406,6 +411,7 @@ watch(
|
|||||||
watch(
|
watch(
|
||||||
() => dataStore.detailsRuleForm.use_org_number,
|
() => dataStore.detailsRuleForm.use_org_number,
|
||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
|
console.log(newVal, "==============value=============");
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
@@ -413,6 +419,8 @@ watch(
|
|||||||
} else {
|
} else {
|
||||||
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
|
dataStore.detailsFormData[1].options = [];
|
||||||
|
dataStore.detailsFormData[2].options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -425,6 +433,7 @@ watch(
|
|||||||
getSetWarehouseSubwarehousesList();
|
getSetWarehouseSubwarehousesList();
|
||||||
} else {
|
} else {
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
|
dataStore.detailsFormData[2].options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user