refactor(wms/coil): 替换预览按钮为图标并优化标签打印逻辑
将预览按钮替换为更简洁的图标,提升界面美观度 优化标签打印逻辑,确保在DOM更新后执行打印操作
This commit is contained in:
@@ -137,7 +137,8 @@
|
|||||||
<i slot="reference" class="el-icon-setting param-icon"></i>
|
<i slot="reference" class="el-icon-setting param-icon"></i>
|
||||||
</el-popover>
|
</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>
|
<el-button style="margin-left: 0px; padding: 4px !important;" type="text" size="mini" @click="handlePrintLabel(item)" title="打印标签">打印</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -485,15 +486,15 @@ export default {
|
|||||||
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
||||||
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
||||||
|
|
||||||
|
this.labelRender.type = row.itemType === 'product' ? '3' : '2'
|
||||||
this.labelRender.data = {
|
this.labelRender.data = {
|
||||||
...row,
|
...row,
|
||||||
itemName: itemName,
|
itemName: itemName,
|
||||||
updateTime: row.updateTime?.split(' ')[0] || '',
|
updateTime: row.updateTime?.split(' ')[0] || '',
|
||||||
};
|
};
|
||||||
this.$refs.labelRender.printLabel();
|
this.$nextTick(() => {
|
||||||
// this.labelRender.visible = true;
|
this.$refs.labelRender.printLabel();
|
||||||
// this.labelRender.data = row;
|
})
|
||||||
// this.labelRender.type = '2';
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 预览标签 */
|
/** 预览标签 */
|
||||||
|
|||||||
Reference in New Issue
Block a user