修复bug
This commit is contained in:
@@ -126,7 +126,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { hiprint, defaultElementTypeProvider, disAutoConnect } from 'vue-plugin-hiprint'
|
import { hiprint, defaultElementTypeProvider, disAutoConnect } from 'vue-plugin-hiprint'
|
||||||
import { newHiprintPrintTemplate } from '@/utils/template-helper'
|
import { newHiprintPrintTemplate } from '@/utils/template-helper'
|
||||||
import template from './template'
|
|
||||||
import printData from './printData'
|
import printData from './printData'
|
||||||
import { customProvider } from './customProvider'
|
import { customProvider } from './customProvider'
|
||||||
|
|
||||||
@@ -222,19 +221,37 @@
|
|||||||
|
|
||||||
addItemToCanvas(name) {
|
addItemToCanvas(name) {
|
||||||
this.panel.addPrintText({
|
this.panel.addPrintText({
|
||||||
type: 'text',
|
|
||||||
data: 'XS888888888',
|
|
||||||
options: {
|
options: {
|
||||||
field: 'barcode',
|
left: 200,
|
||||||
testData: 'XS888888888',
|
field: name,
|
||||||
height: 32,
|
testData: name,
|
||||||
fontSize: 12,
|
title: '',
|
||||||
lineHeight: 18,
|
left: 70.5,
|
||||||
textAlign: 'left',
|
top: 58.5,
|
||||||
textType: 'barcode',
|
height: 18,
|
||||||
hideTitle: true
|
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() {
|
onConfirm() {
|
||||||
@@ -288,7 +305,23 @@
|
|||||||
this.hiprintTemplate.design('#hiprint-printTemplate', {
|
this.hiprintTemplate.design('#hiprint-printTemplate', {
|
||||||
grid: true
|
grid: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.panel = this.hiprintTemplate.printPanels[0]
|
||||||
console.log(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) {
|
if (res.errorCode == 1000000) {
|
||||||
const list = res.result.pageItems.map(v => {
|
const list = res.result.pageItems.map(v => {
|
||||||
return {
|
return {
|
||||||
|
mallId: this.skuSearch.mallId,
|
||||||
mallName: this.currMall.mallName,
|
mallName: this.currMall.mallName,
|
||||||
productName: v.productName,
|
productName: v.productName,
|
||||||
productSkuId: v.labelCodeVO.productSkuId,
|
productSkuId: v.labelCodeVO.productSkuId,
|
||||||
|
|||||||
Reference in New Issue
Block a user