打印条码

来源:互联网 发布:阿里云个人免费邮箱 编辑:程序博客网 时间:2024/05/20 02:26


解决方法:

1编写脚本,放入平台SCMReport/PrinterJS/Printer.js

2模块构件,初始化Javascript脚本: addJavascriptFile("../../SCMReport/PrinterJS/Printer.js")

3操作构件,操作前执行SQL



var name =getFv('M','MeasureName');


var standard =getFv('M','Standard');


var barcode =getFv('M','MeasureBarcode');


if(barcode=='' ||barcode==null)


{


 alert('条码为空,请输入条码后再打印!');


 false;


}


else


{


 try


 {


   PrintMeasureBarCode(name, standard,barcode);


 }


 catch(e)


 {


   alert(e);


   alert('打印机连接错误,请检查你的打印机!');


   false;


 }


}



0 0
原创粉丝点击