0.0.1 • Published 1 year ago

digital-invoice v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

发票组件

  • 问题反馈:wx: zkhh6666

Install-下载

npm install digital-invoice --save
warrning:我们推荐您设置key的,因为不存在它会带来数据的复用性问题

usage-使用说明

import DigitalInvoice from 'digital-invoice'

Vue.use(DigitalInvoice)

<DigitalInvoice />      //数电发票组件,有问题请联系zkhh6666  备注来意

配置项

参数配置

参数名称说明取值默认值
preinstallLocation主表字段的位置先占位preinstallLocation = {index: 0,key: 'erweimaCode',disable: false },...-
preinstallLocationData主表对应位置的内容InvoiceInformation = {erweimaCode: './invoice.png',// 机器编号virtualDevSerialnum:"123456789", ...}-
columnstable表头详细信息向下观看 columns = {title: '货物或应税劳务、服务名称',width: '24%',dataIndex: 'itemName',key: 'itemName',},...-
InitDatatable对应的数据InitData = {"id": 381,"invoiceUuid": "4d3c35e990b34542872171a7c563183e", },...-
listInvoiceMark清单标志Boolean默认false
hellpChinessNum帮助数字自动汉化Boolean默认false
IsQrCode二维码是否展示Boolean默认true-
key解决数据复用问题--
autoCount计算table的amount 和taxAmount 两个值,它的权限大于主表的信息Boolean默认false
IsScale是否使用启用自动缩放字体Boolean默认false

注:

  • 1、【标题头重脚轻问题】 解:二维码比较特殊,preinstallLocation 允许设置style,标题是平均分配,可通过设置padding来顶开,看着不偏重
  • 2、【特殊行业】preinstallLocation 允许设置style,允许设置你想要的颜色

事件配置

事件名称说明传参是否必须
ModalInvoiceList点击“详见清单”后的事件,为了兼容性和自定义样式,没有设置统一弹窗,请您引入ListInvoiceMark组件--

Column

参数说明类型默认值
title名字,例如: 金 额--
width宽度,例如: 16%--
dataIndex对应英文位置,例如: amount--
key唯一的key,可以和dataIndex相同,例如: amount--
aligntable显示位置,例如: 'right','left','center'--
1、 请您将 columns 的 金额(amount)、税率(taxScheme)、税额(taxAmount)打上固定的key,我们清单发票依赖这个key来渲染  🏀🏀🏀
-
2、二维码暂且只支持url('http://baidu.com')、base64("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAAC..." )

版本记录

v0.0.1 2024-03-25

  • 插件发布