增加工单首次查看标识
This commit is contained in:
@@ -269,12 +269,24 @@ function applyWorkerDepositRule(queryClient: ReturnType<typeof useQueryClient>,
|
||||
}
|
||||
|
||||
function matchesWorkOrderKeyword(
|
||||
item: { productName?: unknown; platformOrderId?: unknown },
|
||||
item: { productName?: unknown; platformOrderId?: unknown; material?: unknown },
|
||||
keyword: string,
|
||||
) {
|
||||
const normalizedKeyword = keyword.trim().toLowerCase()
|
||||
if (!normalizedKeyword) return true
|
||||
return [item.productName, item.platformOrderId]
|
||||
const material = isRecord(item.material) ? item.material : {}
|
||||
const collect = isRecord(material.collect) ? material.collect : {}
|
||||
const fields = isRecord(collect.fields) ? collect.fields : {}
|
||||
return [
|
||||
item.productName,
|
||||
item.platformOrderId,
|
||||
fields.gameId,
|
||||
fields.gameNickname,
|
||||
fields.gameAccount,
|
||||
fields.roleName,
|
||||
material.gameId,
|
||||
material.gameNickname,
|
||||
]
|
||||
.map((value) => String(value || '').toLowerCase())
|
||||
.some((value) => value.includes(normalizedKeyword))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user