fix(wms): 修复打印机组件中本地运单详情数据映射问题

调整数据映射逻辑以正确获取原材料和产品名称,并添加调试日志以便追踪数据
This commit is contained in:
砂糖
2025-12-04 09:56:21 +08:00
parent c16878fe23
commit b8066dece5

View File

@@ -164,9 +164,12 @@ export default {
this.localWaybillDetails = newVal.map((item, index) => ({
...item,
quantity: 1, // 默认数量为1
...results[index],
itemName: results[index].rawMaterialName || results[index].productName || ''
...results[index].data,
...results[index].data.rawMaterial,
...results[index].data.product,
itemName: results[index].data.rawMaterial.rawMaterialName || results[index].data.product.productName || ''
}));
console.log(this.localWaybillDetails);
this.loading = false;
})
.catch(error => {