fix(wms): 优化标签预览逻辑和显示内容
- 修改特殊操作类型的判断逻辑,使用范围判断代替具体值 - 重构标签预览数据处理逻辑,简化itemName获取方式 - 更新标签预览模板,调整字段显示名称和内容 - 使用updateTime替代productionDate字段
This commit is contained in:
@@ -462,17 +462,13 @@ export default {
|
||||
/** 预览标签 */
|
||||
handlePreviewLabel(row) {
|
||||
this.labelRender.visible = true;
|
||||
const item = findItemWithBom(row.itemType, row.itemId)
|
||||
// 寻找boms中bom键名为'材质'的
|
||||
const material = item?.boms?.find(bom => bom.attrKey === '材质')
|
||||
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
||||
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
||||
|
||||
console.log('规格', item)
|
||||
this.labelRender.data = {
|
||||
...row,
|
||||
itemName: item?.itemName || '',
|
||||
material: material?.attrValue || '',
|
||||
specification: item?.specification || '',
|
||||
|
||||
itemName: itemName,
|
||||
updateTime: row.updateTime?.split(' ')[0] || '',
|
||||
};
|
||||
},
|
||||
/** 下载二维码 */
|
||||
|
||||
Reference in New Issue
Block a user