digital-invoice
v0.0.1
Published
数电发票、vue发票展示、vue发票模板、vue发票样式
Downloads
6
Readme
发票组件
- 问题反馈: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", ...} | -| |columns | table表头 | 详细信息向下观看 columns = [{title: '货物或应税劳务、服务名称',width: '24%',dataIndex: 'itemName',key: 'itemName',},...] |-| |InitData| table对应的数据 | 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 |-|-| |align | table显示位置,例如: '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
- 插件发布