各位大佬帮忙看看,我需要按规格去统计重量,用表格显示,有什么好方法吗

透视表

没隐藏前跟你表单一样,
字段隐藏了以后,就是这个效果
自定义字段自己编个代码就好了
// <free_field_name> 型号规格表格 </free_field_name>
// <file_name>ModelSpecTable_v1.jsx</file_name>
function ModelSpecTable({ formData }) {
// 定义型号数据配置
const modelConfigs = [
{
modelName: "8010",
weightControlId: "68eaf8d7e42c3406e3c56109",
lengthControlId: "68eaf8d7e42c3406e3c5610a"
},
{
modelName: "406",
weightControlId: "68eaf8d7e42c3406e3c5610b",
lengthControlId: "68eaf8d7e42c3406e3c5610c"
},
{
modelName: "206",
weightControlId: "68eaf8d7e42c3406e3c5610d",
lengthControlId: "68eaf8d7e42c3406e3c5610e"
},
{
modelName: "304",
weightControlId: "68eaf8d7e42c3406e3c5610f",
lengthControlId: "68eaf8d7e42c3406e3c56110"
}
];
return (
return (
<tr key={config.modelName} className={index % 2 === 0 ? 'bg-white' : 'bg-gray-50'}>
<td className="px-3 py-2 border-b border-gray-200 font-medium">{config.modelName}</td>
<td className="px-3 py-2 border-b border-gray-200">
{weightValue !== null && weightValue !== undefined ? weightValue : '-'}
</td>
<td className="px-3 py-2 border-b border-gray-200">
{lengthValue !== null && lengthValue !== undefined ? lengthValue : '-'}
</td>
</tr>
);
})}
</tbody>
</table>
</div>
);
}
型号 | 重量 | 长度 |
---|

汇总加个筛选就可以了吧,要表格的话,自定义字段搞一个
现在就是汇总的,感觉不够简洁;自定义字段可以说下怎么弄吗

统计表嵌入进去
可能不太行,有其他项目的

汇总加个筛选就可以了吧,要表格的话,自定义字段搞一个
统计表嵌入进去