修复bug
This commit is contained in:
@@ -126,7 +126,6 @@
|
||||
<script>
|
||||
import { hiprint, defaultElementTypeProvider, disAutoConnect } from 'vue-plugin-hiprint'
|
||||
import { newHiprintPrintTemplate } from '@/utils/template-helper'
|
||||
import template from './template'
|
||||
import printData from './printData'
|
||||
import { customProvider } from './customProvider'
|
||||
|
||||
@@ -222,19 +221,37 @@
|
||||
|
||||
addItemToCanvas(name) {
|
||||
this.panel.addPrintText({
|
||||
type: 'text',
|
||||
data: 'XS888888888',
|
||||
options: {
|
||||
field: 'barcode',
|
||||
testData: 'XS888888888',
|
||||
height: 32,
|
||||
fontSize: 12,
|
||||
lineHeight: 18,
|
||||
textAlign: 'left',
|
||||
textType: 'barcode',
|
||||
hideTitle: true
|
||||
left: 200,
|
||||
field: name,
|
||||
testData: name,
|
||||
title: '',
|
||||
left: 70.5,
|
||||
top: 58.5,
|
||||
height: 18,
|
||||
width: 116,
|
||||
coordinateSync: false,
|
||||
widthHeightSync: false,
|
||||
hideTitle: true,
|
||||
fontFamily: 'Microsoft YaHei',
|
||||
fontWeight: '700',
|
||||
textContentVerticalAlign: 'middle',
|
||||
contentPaddingLeft: 5.25,
|
||||
qrCodeLevel: 0,
|
||||
right: 186.5,
|
||||
bottom: 73.5,
|
||||
vCenter: 128.5,
|
||||
hCenter: 64.5
|
||||
},
|
||||
printElementType: {
|
||||
title: '文本',
|
||||
type: 'text'
|
||||
}
|
||||
});
|
||||
})
|
||||
const el = this.hiprintTemplate.printPanels[0].printElements.at(-1)
|
||||
const designPaper = this.hiprintTemplate.printPanels[0].designPaper
|
||||
this.hiprintTemplate.printPanels[0].appendDesignPrintElement(designPaper, el, true)
|
||||
el.design(void 0, designPaper)
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
@@ -288,7 +305,23 @@
|
||||
this.hiprintTemplate.design('#hiprint-printTemplate', {
|
||||
grid: true
|
||||
})
|
||||
|
||||
this.panel = this.hiprintTemplate.printPanels[0]
|
||||
console.log(this.hiprintTemplate.printPanels[0])
|
||||
// this.hiprintTemplate.printPanels[0].addPrintText({
|
||||
// type: 'text',
|
||||
// data: 'XS888888888',
|
||||
// options: {
|
||||
// field: 'barcode',
|
||||
// testData: 'XS888888888',
|
||||
// height: 32,
|
||||
// fontSize: 12,
|
||||
// lineHeight: 18,
|
||||
// textAlign: 'left',
|
||||
// textType: 'barcode',
|
||||
// hideTitle: true
|
||||
// }
|
||||
// })
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
if (res.errorCode == 1000000) {
|
||||
const list = res.result.pageItems.map(v => {
|
||||
return {
|
||||
mallId: this.skuSearch.mallId,
|
||||
mallName: this.currMall.mallName,
|
||||
productName: v.productName,
|
||||
productSkuId: v.labelCodeVO.productSkuId,
|
||||
|
||||
Reference in New Issue
Block a user