refactor(wms/coil): 替换预览按钮为图标并优化标签打印逻辑

将预览按钮替换为更简洁的图标,提升界面美观度
优化标签打印逻辑,确保在DOM更新后执行打印操作
This commit is contained in:
砂糖
2026-01-13 10:19:03 +08:00
parent c2d569078b
commit c1cca9e7a1

View File

@@ -137,7 +137,8 @@
<i slot="reference" class="el-icon-setting param-icon"></i>
</el-popover>
<el-button style="margin-left: 0px; padding: 4px !important;" type="text" size="mini" @click="handlePreviewLabel(item)" title="查看标签">预览</el-button>
<i class="el-icon-view param-icon" @click="handlePreviewLabel(item)" title="查看标签"></i>
<!-- <el-button style="margin-left: 0px; padding: 4px !important;" type="text" size="mini" @click="handlePreviewLabel(item)" title="查看标签">预览</el-button> -->
<el-button style="margin-left: 0px; padding: 4px !important;" type="text" size="mini" @click="handlePrintLabel(item)" title="打印标签">打印</el-button>
</div>
</div>
@@ -485,15 +486,15 @@ export default {
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
this.labelRender.type = row.itemType === 'product' ? '3' : '2'
this.labelRender.data = {
...row,
itemName: itemName,
updateTime: row.updateTime?.split(' ')[0] || '',
};
this.$refs.labelRender.printLabel();
// this.labelRender.visible = true;
// this.labelRender.data = row;
// this.labelRender.type = '2';
this.$nextTick(() => {
this.$refs.labelRender.printLabel();
})
},
/** 预览标签 */