用vfp @ say 语句写的超市、服装店小票机打印(不需用报表打印,速度最快)
*打印出小票
SET DEVICE TO print &&设定从打印机输出
*小票格式
@1,1 say "谢谢光临!" font '微软雅黑',9 color RGB(0,0,0)
@3,3 say "浪漫一身服装店" font '微软雅黑',15 color RGB(0,0,0)
@7,1 say "日期:"font '微软雅黑',9 color RGB(0,0,0)
@7,7 say DATETIME() font '微软雅黑',9 color RGB(0,0,0)
@8,1 say "- - - - - - - - - - - - - - - - "
@9,1 say "序号 货 号 数量 单价" font '微软雅黑',9 color RGB(0,0,0)
xdy=12
xhj=1
*打印第一件
@10,1 say "1 " font '微软雅黑',9 color RGB(0,0,0)
@10,5 say thisform.text10.Value font '微软雅黑',9 color RGB(0,0,0)
@10,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@10,20 say thisform.text18.Value font "微软雅黑",9 color RGB(0,0,0)
*打印第二件
IF NOT EMPTY(thisform.text11.Value ) then
@11,1 say "2 " font '微软雅黑',9 color RGB(0,0,0)
@11,5 say thisform.text11.Value font '微软雅黑',9 color RGB(0,0,0)
@11,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@11,20 say thisform.text19.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
*打印第三件
IF NOT EMPTY(thisform.text12.Value ) then
@12,1 say "3 " font '微软雅黑',9 color RGB(0,0,0)
@12,5 say thisform.text12.Value font '微软雅黑',9 color RGB(0,0,0)
@12,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@12,20 say thisform.text20.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
*打印第四件
IF NOT EMPTY(thisform.text13.Value ) then
@13,1 say "4 " font '微软雅黑',9 color RGB(0,0,0)
@13,5 say thisform.text13.Value font '微软雅黑',9 color RGB(0,0,0)
@13,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@13,20 say thisform.text21.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
*打印第五件
IF NOT EMPTY(thisform.text14.Value ) then
@14,1 say "5 " font '微软雅黑',9 color RGB(0,0,0)
@14,5 say thisform.text14.Value font '微软雅黑',9 color RGB(0,0,0)
@14,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@14,20 say thisform.text22.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
*打印第六件
IF NOT EMPTY(thisform.text15.Value ) then
@15,1 say "6 " font '微软雅黑',9 color RGB(0,0,0)
@15,5 say thisform.text15.Value font '微软雅黑',9 color RGB(0,0,0)
@15,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@15,20 say thisform.text23.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
*打印第七件
IF NOT EMPTY(thisform.text16.Value ) then
@16,1 say "7 " font '微软雅黑',9 color RGB(0,0,0)
@16,5 say thisform.text16.Value font '微软雅黑',9 color RGB(0,0,0)
@16,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@16,20 say thisform.text24.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
*打印第八件
IF NOT EMPTY(thisform.text17.Value ) then
@17,1 say "8 " font '微软雅黑',9 color RGB(0,0,0)
@17,5 say thisform.text17.Value font '微软雅黑',9 color RGB(0,0,0)
@17,18 say "1" font '微软雅黑',9 color RGB(0,0,0)
@17,20 say thisform.text25.Value font "微软雅黑",9 color RGB(0,0,0)
xdy=xdy+1
xhj=xhj+1
ENDIF
@xdy,1 say "- - - - - - - - - - - - - - - - "
@xdy+1,1 say "合 计:" font "微软雅黑",10 color RGB(0,0,0)
@xdy+1,8 say STR(xhj,1,0) font '微软雅黑',10 color RGB(0,0,0)
@xdy+1,11 say "件" font "微软雅黑",10 color RGB(0,0,0)
@xdy+1,15 say "总额:" font "微软雅黑",10 color RGB(0,0,0)
@xdy+1,21 say thisform.label31.Caption font "微软雅黑",10 color RGB(0,0,0)
@xdy+1,27 say "元" font "微软雅黑",10 color RGB(0,0,0)
@xdy+3,1 say "- - - - - - - - - - - - - - - - "
Set printer to
相关推荐
多种编号语言下POS打印例程
POS58的POS打印例程,支持VB,PB,VFP及C的打印例子及说明文档。
多种编程语言下POS58打印机编程指南
本文还有配套的精品资源,点击获取 简介:POS58打印机广泛用于零售、餐饮行业,用于打印收据和小票。本编程资源提供了VB、PB、VFP和C语言下的打印例程和文档,帮助开发者在这些语言环境中实现POS58的功能。介绍了使用Windows API、.NET类、VFP命令和C语言系统调用来实现打印,并深入讲解了ESC/POS指令集的使用,以及打印机初始化、错误处理、纸张检测和打印...
【Trans论文复现】基于Agent的电力市场深度决策梯度(深度强化学习)算法建模研究(Python代码实现)
内容概要:本文围绕《【Trans论文复现】基于Agent的电力市场深度决策梯度(深度强化学习)算法建模研究(Python代码实现)》展开,深入探讨了如何运用深度强化学习中的深度决策梯度方法对复杂电力市场环境进行建模与仿真。研究通过构建多智能体系统,模拟市场主体在电力市场中的博弈行为与优化决策过程,重点实现了智能体在动态市场环境下基于深度神经网络的策略学习机制。文中详细阐述了算法的理论基础、模型架构设计及Python代码实现路径,涵盖市场出清、竞价策略优化、资源配置等关键环节,强调对电力市场动态演化过程的精准刻画与预测能力,为复杂能源系统的智能化决策提供了可复现的技术范式。; 适合人群:具备一定Python编程基础和机器学习背景,从事电力系统、能源经济、智能优化等相关领域研究的研发人员或研究生。; 使用场景及目标:① 掌握深度强化学习在电力市场中的建模方法;② 学习多智能体系统在复杂博弈环境下的决策机制;③ 实现电力市场竞价、调度与资源配置的仿真分析与优化。; 阅读建议:建议读者结合文中提供的Python代码与仿真环境动手实践,深入理解算法细节与模型构建逻辑,同时可参考相关文献进一步拓展至其他能源市场应用场景。
share_b0dd64dd072936e16da2f27bbd48bdc51791767975916.mp4
share_b0dd64dd072936e16da2f27bbd48bdc51791767975916.mp4
使用UR5e协作机器人对钢管上固定曲线路径进行自动化超声波测厚的MATLAB、Simulink和URScript代码.zip
使用UR5e协作机器人对钢管上固定曲线路径进行自动化超声波测厚的MATLAB、Simulink和URScript代码.zip


