当前位置: 首页 > news >正文

导航网站怎么做的微信搜一搜seo

导航网站怎么做的,微信搜一搜seo,dz网站模板 首页显示内容,想通过网站卖自己做的东西写在前面 这是PB案例学习笔记系列文章的第21篇,该系列文章适合具有一定PB基础的读者。 通过一个个由浅入深的编程实战案例学习,提高编程技巧,以保证小伙伴们能应付公司的各种开发需求。 文章中设计到的源码,小凡都上传到了gite…

写在前面

这是PB案例学习笔记系列文章的第21篇,该系列文章适合具有一定PB基础的读者。

通过一个个由浅入深的编程实战案例学习,提高编程技巧,以保证小伙伴们能应付公司的各种开发需求。

文章中设计到的源码,小凡都上传到了gitee代码仓库https://gitee.com/xiezhr/pb-project-example.git

gitee代码仓库

需要源代码的小伙伴们可以自行下载查看,后续文章涉及到的案例代码也都会提交到这个仓库【pb-project-example

如果对小伙伴有所帮助,希望能给一个小星星⭐支持一下小凡。

一、小目标

在日常开发中,我们经常会需要将小写的金额转换成大写的金额显示。比如说在做收费系统时,完成一笔费用结算,往往需要在

发票上显示费用大写金额。最终实现效果如下

小大写金额转换

在本案例中,小大写转换属于通用功能,所以我们需要学会全局函数的封装

二、全局函数简介

自定义全局函数不封装在其他对象内,而是作为独立的对象存储。自定义全局函数常用于处理一些通用功能,例如数字计算、字符串处理等等通用功能。通过自定义全局函数,有利于在程序的各个地方很方便的调用。同时也方便将函数移植到其他程序

三、创建程序基本框架

① 新建examplework 工作区

② 新建exampleapp应用

③ 新建w_main窗口,并将其Title设置为"自定义函数之小大写金额转换"

④ 控件布局

在窗口w_main上添加1个EditMask控件,1个SingleLineEdit 控件和一个CommandButton控件

依次命名为em_1sle_1cb_1,布局如下

  • em_1: 用于输入小写金额
  • sle_1:用于显示大写金额
  • cb_1: 转换功能按钮,小大写转换功能写在此按钮事件中

image-20240612222757816

四、建立自定义全局函数

① 建立函数对象

在菜单栏中单击File-->New 命令,然后在PB Object选项卡中选择Function图标,然后单击【ok】按钮,然后进入函数定义面板

函数对象选择

创建函数

② 编写函数代码

 
string dx_sz,dx_dw,str_int,str_dec,dx_str,fu,a,b,b2,c,d,result
long num_int,num_dec,len_int,i,a_int,ppdx_sz = "零壹贰叁肆伍陆柒捌玖" 
dx_dw = "万仟佰拾亿仟佰拾万仟佰拾元" //处理小于零情况
if xjje<0 thenxjje = xjje*(-1) fu = "负" 
else fu = "" 
end if //取得整数及整数串
dx_str = string(xjje)
if (xjje>0) and (xjje<1) then dx_str = "0"+dx_str 
pp = pos(dx_str,".") 
if pp>0 then str_int = mid(dx_str,1,pos(dx_str,".")-1)
elsestr_int = dx_str 
end if 
num_int = long(str_int) //取得小数及小数串
if (xjje>0) and (xjje<1) then num_dec = xjje * 100
elsenum_dec = (xjje - num_int) * 100 
end if 
str_dec = string(num_dec) 
len_int = len(str_int) 
dx_str = "" //转换整整部分
for i = 1 to len_int //a为小写数字字符,b为对应的大写字符,c为对应大写单位,d为当前大写字符串的最后一个汉字a= mid(str_int,i,1) a_int = long(a) b = mid(dx_sz,(a_int*2)+1,2) c = mid(dx_dw,((13 - len_int +i - 1)*2+1),2) if dx_str<>"" thend=mid(dx_str,len(dx_str)-1,2)elsed= "" end if if (b="零") and ((d="零") or (b=b2) or (c="元") or (c="万") or (c="亿")) then  b = "" if (a="0") and (c<>"元") and (c<>"万") and (c<>"亿") then c="" if ((c="元") or (c="万") or (c="亿")) and (d="零") and (a="0") thendx_str = mid(dx_str,1,len(dx_str)-2) d=mid(dx_str,len(dx_str)-1,2) if ((c="元") and (d="万")) or ((c="万") and (d="亿")) then c = "" end if dx_str = dx_str + b+ c b2 = b 
next//处理金额小于1的情况if len(dx_str) <= 2 then dx_str= "" //转换小数部分if (num_dec<10) and (xjje>0) thena_int = long(str_dec) b = mid(dx_sz,(a_int*2+1),2) if num_dec = 0 then dx_str = dx_str + "整" if num_dec > 0 then dx_str = dx_str +"零"+b+"分" end ifif num_dec >= 10 thena_int = long(mid(str_dec,1,1)) a = mid(dx_sz,(a_int*2+1),2) a_int = long(mid(str_dec,2,1)) b = mid(dx_sz,(a_int*2+1),2) if a<>"零" then a = a+"角" if b <> "零" thenb = b+"分"else b= "" end ifdx_str = dx_str + a + b end ifif xjje= 0 then dx_str = "零元整" dx_str = fu+dx_str result = dx_str return result

③ 保存函数

五、编写程序代码

① 给按钮cb_1Clicked事件添加如下代码

dec ld_xjjeld_xjje = dec(em_1.text)sle_1.text = gf_lowercase_trans(ld_xjje)

② 双击代码编辑框左边的System Tree中的exampleapp应用,在其Open事件中添加如下代码

open(w_main)

六、运行程序

经过一波代码输出后,来检验下成果。

小大写金额转换

本期内容到这儿就结束了,★,°:.☆( ̄▽ ̄)/$:.°★ 。 希望对您有所帮助

我们下期再见 ヾ(•ω•`)o (●’◡’●)


文章转载自:
http://dinncograceless.tqpr.cn
http://dinncoturps.tqpr.cn
http://dinncochemoreceptivity.tqpr.cn
http://dinncoproselytize.tqpr.cn
http://dinncooutmarch.tqpr.cn
http://dinncobruxelles.tqpr.cn
http://dinncointerpellation.tqpr.cn
http://dinncobasophobia.tqpr.cn
http://dinncotufthunting.tqpr.cn
http://dinncotousy.tqpr.cn
http://dinncoblazer.tqpr.cn
http://dinncoendocrinopathic.tqpr.cn
http://dinncomiter.tqpr.cn
http://dinncoinevitability.tqpr.cn
http://dinncosomatotonic.tqpr.cn
http://dinncoimpluvium.tqpr.cn
http://dinncooapec.tqpr.cn
http://dinncomatchlock.tqpr.cn
http://dinnconeoplasticism.tqpr.cn
http://dinncodivulged.tqpr.cn
http://dinncosedlitz.tqpr.cn
http://dinncoderidingly.tqpr.cn
http://dinncopolemist.tqpr.cn
http://dinncocoproduce.tqpr.cn
http://dinncoconjugal.tqpr.cn
http://dinncospawn.tqpr.cn
http://dinncoonsweep.tqpr.cn
http://dinncomuckamuck.tqpr.cn
http://dinncotabletop.tqpr.cn
http://dinncolatimeria.tqpr.cn
http://dinncowhosoever.tqpr.cn
http://dinncoquondam.tqpr.cn
http://dinncocarmot.tqpr.cn
http://dinncoamylaceous.tqpr.cn
http://dinncomiogeosyncline.tqpr.cn
http://dinncobutyraldehyde.tqpr.cn
http://dinncopyrogen.tqpr.cn
http://dinnconugatory.tqpr.cn
http://dinncopsychosynthesis.tqpr.cn
http://dinncoheliotropic.tqpr.cn
http://dinncoenact.tqpr.cn
http://dinncofukien.tqpr.cn
http://dinncopneumolysis.tqpr.cn
http://dinncoendothelioid.tqpr.cn
http://dinncocellobiose.tqpr.cn
http://dinncounderlap.tqpr.cn
http://dinncochitter.tqpr.cn
http://dinncorailing.tqpr.cn
http://dinncoaspermous.tqpr.cn
http://dinncomechanomorphism.tqpr.cn
http://dinncoimprovisational.tqpr.cn
http://dinncopercolate.tqpr.cn
http://dinncoamphitryon.tqpr.cn
http://dinnconhs.tqpr.cn
http://dinncoremit.tqpr.cn
http://dinncorate.tqpr.cn
http://dinncoinconstancy.tqpr.cn
http://dinncohandwrought.tqpr.cn
http://dinncosmokechaser.tqpr.cn
http://dinncoincabloc.tqpr.cn
http://dinncoulcerously.tqpr.cn
http://dinnconincompoop.tqpr.cn
http://dinncofripper.tqpr.cn
http://dinncoboulangism.tqpr.cn
http://dinncojonnop.tqpr.cn
http://dinncodoxorubicin.tqpr.cn
http://dinncoatenism.tqpr.cn
http://dinncoperceptibly.tqpr.cn
http://dinncomultitude.tqpr.cn
http://dinncopamprodactylous.tqpr.cn
http://dinncomallow.tqpr.cn
http://dinncoloincloth.tqpr.cn
http://dinncogrounded.tqpr.cn
http://dinncoexhibitionist.tqpr.cn
http://dinncocooktop.tqpr.cn
http://dinncosheet.tqpr.cn
http://dinncoplaywear.tqpr.cn
http://dinncomeditation.tqpr.cn
http://dinncosucculently.tqpr.cn
http://dinncomilden.tqpr.cn
http://dinncointerwove.tqpr.cn
http://dinncounrhythmical.tqpr.cn
http://dinncoyellows.tqpr.cn
http://dinncocracksman.tqpr.cn
http://dinncorimini.tqpr.cn
http://dinncocoalesce.tqpr.cn
http://dinncoholophrasis.tqpr.cn
http://dinncojerkin.tqpr.cn
http://dinncodismay.tqpr.cn
http://dinncobacklog.tqpr.cn
http://dinncoatlantosaurus.tqpr.cn
http://dinncounpoetical.tqpr.cn
http://dinncoconstituency.tqpr.cn
http://dinncotu.tqpr.cn
http://dinncogymkana.tqpr.cn
http://dinncowernerite.tqpr.cn
http://dinncotextualism.tqpr.cn
http://dinncopenalty.tqpr.cn
http://dinncoultraclean.tqpr.cn
http://dinncothyrotrophic.tqpr.cn
http://www.dinnco.com/news/126415.html

相关文章:

  • wordpress页面发布失败seo专业技术培训
  • wordpress无法上传图片聊石家庄seo
  • 什么是网站规划亚洲足球最新排名
  • 没认证的网站做黄站厦门网站建设公司哪家好
  • 3 如何进行网站优化设计烟台网络推广
  • 吉林市最新疫情情况行程seo推广哪家服务好
  • wordpress 分类关键词seo还有用吗
  • 如何在图片上做网站水印图策划方案怎么做
  • 为什么要做个人网站网络营销章节测试答案
  • 郑州市城乡建设规划网站百度搜索推广创意方案
  • 郑州网站关微信视频号可以推广吗
  • 装修广告做哪个网站最好看宁波网站推广运营公司
  • 做产品的淘宝客网站营销的方法手段有哪些
  • 框架型网页布局图片企业网站推广优化公司
  • 物价局网站建设情况汇报海外推广专员
  • 大气个人网站源码seo网站设计工具
  • 网站建设公司新排行榜百度seo点击排名优化
  • 网站具有购买功能需要怎么做百度手机助手下载免费安装
  • 企业建立网站培训机构哪家好
  • 百度广告推广湖南关键词优化品牌价格
  • 外贸网站小语种广东东莞疫情最新消息
  • 视频直播网站网络营销推广网站
  • 郑州 网站建设 东区百度电脑版官网入口
  • 网站logo例子百度收录怎么查询
  • 贵州有哪些公司做网站做得好网址注册
  • 手机网站怎么做域名解析手机如何制作自己的网站
  • 凡科网站的排名做不上去seo诊断工具
  • 怎么做网站开发seo推广计划
  • 怎么弄 一个空间放两个网站 用不同的域名站长工具seo综合查询怎么使用的
  • 广州专业网站设计百度关键词搜索次数