|
|
|
@@ -147,6 +147,7 @@ const AssignAndRelease: React.FC<Props> = ({ filterArgs }) => { |
|
|
|
const params = { |
|
|
|
...pagingController, |
|
|
|
...filterArgs, |
|
|
|
status: "pending", |
|
|
|
// 新增:排除状态为 "assigned" 的提料单 |
|
|
|
//status: "pending,released,completed,cancelled" // 或者使用其他方式过滤 |
|
|
|
}; |
|
|
|
@@ -160,10 +161,10 @@ const AssignAndRelease: React.FC<Props> = ({ filterArgs }) => { |
|
|
|
console.log("First record:", res.records[0]); |
|
|
|
|
|
|
|
// 新增:在前端也过滤掉 "assigned" 状态的项目 |
|
|
|
const filteredRecords = res.records.filter( |
|
|
|
(item: any) => (item.status || "").toLowerCase() === "pending" |
|
|
|
); |
|
|
|
const itemRows: ItemRow[] = filteredRecords.map((item: any) => ({ |
|
|
|
// const filteredRecords = res.records.filter( |
|
|
|
// (item: any) => (item.status || "").toLowerCase() === "pending" |
|
|
|
//); |
|
|
|
const itemRows: ItemRow[] = res.records.map((item: any) => ({ |
|
|
|
id: item.id, |
|
|
|
pickOrderId: item.pickOrderId, |
|
|
|
pickOrderCode: item.pickOrderCode, |
|
|
|
@@ -182,7 +183,8 @@ const AssignAndRelease: React.FC<Props> = ({ filterArgs }) => { |
|
|
|
|
|
|
|
setOriginalItemData(itemRows); |
|
|
|
setFilteredItems(itemRows); |
|
|
|
setTotalCountItems(filteredRecords.length); // 使用过滤后的数量 |
|
|
|
setTotalCountItems(res.total ?? 0); |
|
|
|
//setTotalCountItems(filteredRecords.length); // 使用过滤后的数量 |
|
|
|
} else { |
|
|
|
console.log("No records in response"); |
|
|
|
setFilteredItems([]); |
|
|
|
|