fix(wms/coil/materialWarning): 优化标签打印逻辑,格式化更新时间

重构打印标签的处理流程,直接调用子组件打印方法替代手动操作DOM,同时将更新时间格式化为年月日格式
This commit is contained in:
砂糖
2026-07-06 17:47:08 +08:00
parent b49209bc1a
commit f55bb42557

View File

@@ -334,16 +334,13 @@ export default {
/** 打印标签 */ /** 打印标签 */
handlePrintLabel(row) { handlePrintLabel(row) {
this.labelRender.data = row; this.labelRender.data = {
this.labelRender.type = getCoilTagPrintType(row); ...row,
updateTime: row.updateTime?.split(' ')[0] || '',
};
this.$nextTick(() => { this.$nextTick(() => {
const el = this.$refs.labelRender && this.$refs.labelRender.$el; this.$refs.labelRender.printLabel();
if (el) { })
el.style.display = 'block';
window.print();
el.style.display = 'none';
}
});
}, },
handleExport() { handleExport() {