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

企业站seo价格网页制作作业100例

企业站seo价格,网页制作作业100例,如何做网站的自由撰稿人,成都网站制作公司 dedecms有时候,我们需要显示中文大写金额,比如打印银行付款申请单等。 新建一个工程,加入一个标准模块在模块中加入如下代码,窗口中调用 AmountInChineseWords 函数即可。最大解析到百万亿,小数最多解析两位到分。 模块代码…

有时候,我们需要显示中文大写金额,比如打印银行付款申请单等。

新建一个工程,加入一个标准模块在模块中加入如下代码,窗口中调用  AmountInChineseWords 函数即可。最大解析到百万亿,小数最多解析两位到分。

模块代码如下: 

'用户昵称: 留下些什么
'个人简介: 一个会做软件的货代
'CSDN网址:https://blog.csdn.net/zezese
'电子邮箱:31319180@qq.comOption Explicit'最大解析到百万亿,小数最多解析两位到分Function AmountInChineseWords(Amount As Double) As StringIf Amount < 0 ThenAmountInChineseWords = "负" & AmountInChineseWords(Abs(Amount))Exit FunctionEnd IfDim strValue As String, strValueInWord As StringstrValue = CStr(Amount)Dim nPoint As IntegernPoint = InStrRev(strValue, ".")If nPoint > 0 Then '有小数点If Amount < 1 ThenstrValueInWord = DecimalInWord(Mid$(strValue, nPoint + 1), True)ElsestrValueInWord = IntegerInWord(Left$(strValue, nPoint - 1)) & DecimalInWord(Mid$(strValue, nPoint + 1), False)End IfElse ' 没有小数点strValueInWord = IIf(Amount = 0, "零", IntegerInWord(strValue) & "整")End IfAmountInChineseWords = strValueInWordEnd FunctionPrivate Function DecimalInWord(strValue As String, bTotalAmountLessThanOne As Boolean) As StringDim strChineseNumericWords()strChineseNumericWords = Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖")Dim strRMBUnits()strRMBUnits = Array("角", "分")Dim i As Integer, nValue As IntegerDim strTmp As String, strValueInWord As StringFor i = 1 To Len(strValue)nValue = CInt(Mid$(strValue, i, 1))strTmp = strChineseNumericWords(nValue) & _IIf(nValue > 0, strRMBUnits(i - 1), "")strValueInWord = strValueInWord & strTmpIf i = 2 Then Exit For '最多处理两位小数,到分NextIf bTotalAmountLessThanOne And Left$(strValueInWord, 1) = "零" Then ' 0.01 这种情况需要把前面的零去掉strValueInWord = Mid$(strValueInWord, 2)End IfDecimalInWord = strValueInWordEnd FunctionPrivate Function IntegerInWord(strValue As String) As StringDim strChineseNumericWords(), strChineseNumericUnits()strChineseNumericWords = Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖")strChineseNumericUnits = Array("", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟", "万", "拾", "佰", "仟")Dim i As Integer, nValue As IntegerDim strTmp As String, strValueInWord As StringFor i = 1 To Len(strValue)nValue = CInt(Mid$(strValue, Len(strValue) - i + 1, 1))If (i = 5 Or i = 9 Or i = 13) And nValue = 0 Then '万, 亿, 万亿位strTmp = strChineseNumericUnits(i - 1)ElsestrTmp = strChineseNumericWords(nValue) & _IIf(nValue > 0, strChineseNumericUnits(i - 1), "")End IfstrValueInWord = strTmp & strValueInWordIf i - 1 = UBound(strChineseNumericUnits) Then Exit For '最多处理到万亿Next'多个零只显示一个零DoIf strValueInWord Like "*零零*" ThenstrValueInWord = Replace$(strValueInWord, "零零", "零")ElseExit DoEnd IfLoop'处理一些特殊情况If strValueInWord Like "*零万*" ThenstrValueInWord = Replace$(strValueInWord, "零万", "万")End IfIf strValueInWord Like "*零亿*" ThenstrValueInWord = Replace$(strValueInWord, "零亿", "亿")End IfIf strValueInWord Like "*亿万*" ThenstrValueInWord = Replace$(strValueInWord, "亿万", "亿")End If'去头去尾If Left$(strValueInWord, 1) = "零" ThenstrValueInWord = Mid$(strValueInWord, 2)End IfIf Right$(strValueInWord, 1) = "零" ThenstrValueInWord = Left$(strValueInWord, Len(strValueInWord) - 1)End IfIntegerInWord = strValueInWord & "元"End Function

http://www.wangmingla.cn/news/122359.html

相关文章:

  • 网站被墙301怎么做有没有自动排名的软件
  • 如何创建属于个人网站百度大数据分析工具
  • 如何向雅虎提交网站网络营销的主要手段和策略
  • 做go分析的网站网络推广免费平台
  • 电商销售渠道有哪些关键词优化推广排名
  • 中国正规官方网站有哪些外贸建站推广公司
  • 中山市城乡和住房建设局网站优化大师是什么
  • 个人搭建网站教程最近疫情最新消息
  • 湖南网站建设价位微信小程序平台官网
  • 公司做网站的价格拉新充场app推广平台
  • 做网站视频的赚钱吗百度大数据分析工具
  • 重庆营销型网站双11各大电商平台销售数据
  • 龙岩做网站设计公司北京官网seo
  • 武汉做网站icp搜索引擎营销简称
  • 中国特色政府网站建设模式百度网盘客服人工电话95188
  • 做IP授权的一般看什么网站百度新闻网站
  • 深圳做生鲜的网站叫什么免费下载app并安装
  • 做盗版电影网站犯法不百度网站推广价格
  • 做网站要学那些安年软文网
  • 网站建设自助建站企业上海网站制作公司
  • 做一个信息发布网站要多少钱优化课程
  • 国外注册的域名国内能用吗如何优化网站快速排名
  • diy网站开发公司seo云优化如何
  • 龙华做网站公司软文范例100例
  • 网站建设技术解决方案百度网盟推广
  • 如何设置网站icon天津seo托管
  • 黄骅港房价多少钱一平佛山seo教程
  • 韶关哪里做网站最好长沙市seo百度关键词
  • 怎样做好手机网站建设潍坊在线制作网站
  • 做公司网站利润网络营销方案策划书