From ee93477d8cfd0516f0f690260b77c4d49196455d Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 21 Jun 2023 16:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/print.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/print.html b/public/print.html index 9d0265a..0f41890 100644 --- a/public/print.html +++ b/public/print.html @@ -102,12 +102,13 @@ //文字描述 ctx.fillText("苏州河道管理处", 100, 30); ctx.fillText("物资编码:" + zcbm, qrcodeleft + 120, 65); - ctx.fillText("物资类型:" + wzlx, qrcodeleft + 120, 155); if(str.length<=4){ - ctx.fillText("资产名称:"+str, qrcodeleft + 120, 95); + ctx.fillText("物资类型:" + wzlx, qrcodeleft + 120, 95); + ctx.fillText("资产名称:"+str, qrcodeleft + 120, 125); }else{ - ctx.fillText("资产名称:"+str.substring(0,4), qrcodeleft + 120, 95); - ctx.fillText(str.substring(4,str.length), qrcodeleft + 120, 125); + ctx.fillText("物资类型:" + wzlx, qrcodeleft + 120, 95); + ctx.fillText("资产名称:"+str.substring(0,4), qrcodeleft + 120, 125); + ctx.fillText(str.substring(4,str.length), qrcodeleft + 120, 155); } ctx.drawImage(img, qrcodeleft, qrcodetop); var data = canvas.toDataURL('image/png', 1);