fix: 修复图表的添加到检查列表无效 (#1513)

Reviewed-on: daoyoucloud/tachybase#1513
Reviewed-by: sealday <zhanglin@daoyoucloud.com>
Co-authored-by: wjh <wwwjh0710@163.com>
Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
wjh 2024-09-05 16:36:15 +08:00 committed by sealday
parent 5da6c30973
commit 2942be453f

View File

@ -29,7 +29,13 @@ export const useAddToChecklistActionProps = () => {
const numbers = [];
result?.forEach((items) => {
numbers.push(...items.reduce((orders, current) => [...orders, ...current['单号']], []));
numbers.push(
...items.reduce((orders, current) => {
const numberList = [...orders];
if (current['单号']) numberList.push(...current['单号']);
return numberList;
}, []),
);
});
await api.resource('detail_checks').create({
values: {