打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
打印代码调用
procedure TFlookorderbills.BprintABillClick(Sender: TObject);
var
  Errors:string;
begin
  if ZRD1.Active then
  begin
     if not isBatPrint.Checked then
     begin

         if (ZRD1.Fields[7].AsInteger>0) then
         begin
             dmd.PrintBill('orderbill','billid='+inttostr(ZRD1.Fields[0].AsInteger));
         end
         else dmd.MSG('订单未审核完成,不能打印!',mtError);
     end else begin
     //执行批量打印,打印列表中所有订单
         if dmd.MSG('当前操作为:批量打印订单。'+#13+#10+'确定此操作?',mtWarning)=mrOKthen
         begin
           try
               G1.Enabled:=false;
               Errors:='';
               ZRD1.First;
               dmd.BatPrintJob.NewJob('orderbill','Default');
               while not ZRD1.EOF do
               begin
                  if (ZRD1.Fields[7].AsInteger>0) then
                  begin
                     dmd.BatPrintJob.AddJob('billid='+inttostr(ZRD1.Fields[0].AsInteger));
                  end
                  else Errors:=Errors+#13+#10+'不能打印订单,原因:未审核,订单ID:'+inttostr(ZRD1.Fields[0].AsInteger);
                  ZRD1.Next;
               end ;
               if Errors<>'' then
                  ifdmd.MSG('有错误发生,是否继续打印?'+Errors,mtWarning)<>mrOKthen exit;
               dmd.PrintBatJob(false);
           finally
              G1.Enabled:=true;
           end ;
         end ;
     end ;

  end else dmd.MSG('列表中无订单可供打印。',mtError);
end;       
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
delphi 99乘法表
Delphi7从子线程中发送消息到主线程触发事件执行
Delphi 正则表达式之TPerlRegEx 类的属性与方法(1): 查找
Application.Processmessage 类似的功能
XLSReadWriteII5使用示例
Delphi 中if else 的用法
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服