|
|
|
@ -1013,7 +1013,14 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
returnRealSize(size){ |
|
|
|
return Number((size / this.smailDcl).toFixed(0)) |
|
|
|
if(this.smailDcl >= 1){ |
|
|
|
return Number((size / this.smailDcl).toFixed(2)) |
|
|
|
}else{ |
|
|
|
return size |
|
|
|
} |
|
|
|
}, |
|
|
|
returnFontSize(size){ |
|
|
|
return Number((size / this.smailDcl).toFixed(0)) - 1 |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
let that = this |
|
|
|
@ -1034,7 +1041,7 @@ |
|
|
|
|
|
|
|
//店铺名 |
|
|
|
// 设置字体样式 |
|
|
|
ctx.font = 'bold '+ that.returnRealSize(150) +'px SimSun'; |
|
|
|
ctx.font = 'bold '+ that.returnFontSize(150) +'px SimSun'; |
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
var text = this.shopName+' 销售单'; |
|
|
|
@ -1047,7 +1054,7 @@ |
|
|
|
|
|
|
|
// 设置字体样式 |
|
|
|
|
|
|
|
ctx.font = 'bold '+ that.returnRealSize(60) +'px SimSun'; |
|
|
|
ctx.font = 'bold '+ that.returnFontSize(60) +'px SimSun'; |
|
|
|
|
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
@ -1189,7 +1196,7 @@ |
|
|
|
ctx.draw(true) |
|
|
|
|
|
|
|
// 设置字体样式 |
|
|
|
ctx.font = 'bold '+that.returnRealSize(70)+'px SimSun'; |
|
|
|
ctx.font = 'bold '+that.returnFontSize(70)+'px SimSun'; |
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
ctx.fillText('本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')', that.returnRealSize(20) , lastHeight+=that.returnRealSize(100)) |
|
|
|
@ -1214,7 +1221,7 @@ |
|
|
|
ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight+=that.returnRealSize(100)) |
|
|
|
ctx.draw(true) |
|
|
|
// 设置字体样式 |
|
|
|
ctx.font = 'bold '+that.returnRealSize(60)+'px SimSun'; |
|
|
|
ctx.font = 'bold '+that.returnFontSize(60)+'px SimSun'; |
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
|
|
|
|
@ -1586,7 +1593,7 @@ |
|
|
|
this.printHeight1 = smailBegin |
|
|
|
this.myCanvasHeight = this.printHeight1+'px' |
|
|
|
if(this.smailDcl >= 1){ |
|
|
|
this.printWidth1 = Number(Number(this.printWidth1 / this.smailDcl).toFixed(0)) |
|
|
|
this.printWidth1 = Number(Number(this.printWidth1 / this.smailDcl).toFixed(0)) |
|
|
|
} |
|
|
|
this.myCanvasWidth = this.printWidth1+'px' |
|
|
|
setTimeout(res => { |
|
|
|
|