fix: 🧩 修復bug

This commit is contained in:
2025-10-14 09:31:12 +08:00
parent ef38880743
commit c18746fcf5
6 changed files with 54 additions and 5 deletions

View File

@@ -34,6 +34,22 @@ export const FORM_DATA: FormItem[] = [
placeholder: "请输入品线",
type: "input",
label: "品线: "
},
{
prop: "disabled",
placeholder: "请选择",
type: "select",
label: "物料状态: ",
options: [
{
value: 1,
label: "禁用"
},
{
value: "启用",
label: "启用"
}
]
}
];

View File

@@ -1,3 +1,4 @@
import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
{ type: "selection", fixed: "left", width: 40 },
{
@@ -69,5 +70,24 @@ export const COLUMNS = [
label: "SPU",
prop: "spu",
width: 200
},
{
align: "left",
label: "物料状态",
prop: "disabled",
width: 200,
render: (scope: RenderScope<any>): VNode | string | any => {
const OBJ: any = {
0: "启用",
1: "禁用"
};
return OBJ[scope.row.disabled];
}
},
{
align: "left",
label: "更新时间",
prop: "updated_at",
width: 200
}
];

View File

@@ -66,7 +66,7 @@ const selectionChange = (selection: any) => {
};
const handleButtonClickCallback = (item: any) => {
const { type } = item;
// dataStore.selectionList, proTableRef
btnClick[type]({
selectionList: dataStore.selectionList,
proTableRef,

View File

@@ -39,7 +39,7 @@ const getWarehousesList = async () => {
data.forEach((item: any) => {
options.push({
id: item.id,
value: item.warehouse_number,
value: item.warehouse_number + "_" + item.id,
label: item.warehouse_name
});
});